1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 228 unchanged lines hidden (view full) --- 237{ 238 size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; 239 240 ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); 241 242 if (zio_use_uma) 243 return (kmem_cache_alloc(zio_data_buf_cache[c], KM_PUSHPAGE)); 244 else |
245 return (kmem_alloc(size, KM_SLEEP | KM_NODEBUG)); |
246} 247 248void 249zio_buf_free(void *buf, size_t size) 250{ 251 size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; 252 253 ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); --- 2759 unchanged lines hidden --- |