From 3fde38df464a9be4f0a6dc505433fe1f846d614b Mon Sep 17 00:00:00 2001 From: Mike Silbersack Date: Tue, 23 Sep 2003 18:56:54 +0000 Subject: [PATCH] Adjust the kmapentzone limit so that it takes into account the size of maxproc and maxfiles, as procs, pipes, and other structures cause allocations from kmapentzone. Submitted by: tegge --- sys/vm/vm_map.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index ebc4040bb32..c299e92a76e 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -269,7 +270,8 @@ void vm_init2(void) { uma_zone_set_obj(kmapentzone, &kmapentobj, lmin(cnt.v_page_count, - (VM_MAX_KERNEL_ADDRESS - KERNBASE) / PAGE_SIZE) / 8); + (VM_MAX_KERNEL_ADDRESS - KERNBASE) / PAGE_SIZE) / 8 + + maxproc * 2 + maxfiles); vmspace_zone = uma_zcreate("VMSPACE", sizeof(struct vmspace), NULL, #ifdef INVARIANTS vmspace_zdtor, -- 2.45.2