If caller specifies UMA_ZONE_OFFPAGE explicitly, then do not waste memory

in an allocation for a slab.

Reviewed by:	jeff
This commit is contained in:
Gleb Smirnoff 2012-09-18 20:28:55 +00:00
parent 8a382371f1
commit 2864dbbfc1

View File

@ -1127,7 +1127,9 @@ keg_small_init(uma_keg_t keg)
keg->uk_rsize = rsize;
keg->uk_ppera = 1;
if (keg->uk_flags & UMA_ZONE_REFCNT) {
if (keg->uk_flags & UMA_ZONE_OFFPAGE) {
shsize = 0;
} else if (keg->uk_flags & UMA_ZONE_REFCNT) {
rsize += UMA_FRITMREF_SZ; /* linkage & refcnt */
shsize = sizeof(struct uma_slab_refcnt);
} else {