Author: glebius Date: Tue Sep 18 20:28:55 2012 New Revision: 240676 URL: http://svn.freebsd.org/changeset/base/240676
Log: If caller specifies UMA_ZONE_OFFPAGE explicitly, then do not waste memory in an allocation for a slab. Reviewed by: jeff Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Sep 18 20:28:01 2012 (r240675) +++ head/sys/vm/uma_core.c Tue Sep 18 20:28:55 2012 (r240676) @@ -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 { _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"