View | Details | Raw Unified | Return to bug 227116 | Differences between
and this patch

Collapse All | Expand All

(-)uma_core.c (-2 / +4 lines)
Lines 1473-1479 keg_ctor(void *mem, int size, void *udata, int fla Link Here
1473
	if (keg->uk_flags & UMA_ZONE_CACHESPREAD) {
1473
	if (keg->uk_flags & UMA_ZONE_CACHESPREAD) {
1474
		keg_cachespread_init(keg);
1474
		keg_cachespread_init(keg);
1475
	} else {
1475
	} else {
1476
		if (keg->uk_size > (UMA_SLAB_SIZE - sizeof(struct uma_slab)))
1476
		if (keg->uk_size > UMA_SLAB_SPACE)
1477
			keg_large_init(keg);
1477
			keg_large_init(keg);
1478
		else
1478
		else
1479
			keg_small_init(keg);
1479
			keg_small_init(keg);
Lines 1820-1828 uma_startup_count(int vm_zones) Link Here
1820
#endif
1820
#endif
1821
1821
1822
	/* Memory for the rest of startup zones, UMA and VM, ... */
1822
	/* Memory for the rest of startup zones, UMA and VM, ... */
1823
	if (zsize > UMA_SLAB_SIZE)
1823
	if (zsize > UMA_SLAB_SPACE)
1824
		pages += (zones + vm_zones) *
1824
		pages += (zones + vm_zones) *
1825
		    howmany(roundup2(zsize, UMA_BOOT_ALIGN), UMA_SLAB_SIZE);
1825
		    howmany(roundup2(zsize, UMA_BOOT_ALIGN), UMA_SLAB_SIZE);
1826
	else if (roundup2(zsize, UMA_BOOT_ALIGN) > UMA_SLAB_SPACE)
1827
		pages += zones;
1826
	else
1828
	else
1827
		pages += howmany(zones,
1829
		pages += howmany(zones,
1828
		    UMA_SLAB_SPACE / roundup2(zsize, UMA_BOOT_ALIGN));
1830
		    UMA_SLAB_SPACE / roundup2(zsize, UMA_BOOT_ALIGN));

Return to bug 227116