From b8598e583edea9bfd92993ac2988d8a0f5449fad Mon Sep 17 00:00:00 2001 From: msmith Date: Thu, 21 Jan 1999 21:54:32 +0000 Subject: Allow VM_KMEM_SIZE to be tuned from the kernel environment. This tuning value *completely* overrides any value precalculated by the kernel. --- sys/kern/kern_malloc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/kern/kern_malloc.c') diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index be9f9d3..04ca105 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94 - * $Id: kern_malloc.c,v 1.51 1999/01/10 01:58:24 eivind Exp $ + * $Id: kern_malloc.c,v 1.52 1999/01/21 08:29:04 dillon Exp $ */ #include "opt_vm.h" @@ -395,6 +395,7 @@ kmeminit(dummy) register long indx; int npg; int mem_size; + int xvm_kmem_size; #if ((MAXALLOCSAVE & (MAXALLOCSAVE - 1)) != 0) #error "kmeminit: MAXALLOCSAVE not power of 2" @@ -431,6 +432,10 @@ kmeminit(dummy) vm_kmem_size = VM_KMEM_SIZE_MAX; #endif + /* Allow final override from the kernel environment */ + if (getenv_int("kern.vm.kmem.size", &xvm_kmem_size)) + vm_kmem_size = xvm_kmem_size; + if (vm_kmem_size > 2 * (cnt.v_page_count * PAGE_SIZE)) vm_kmem_size = 2 * (cnt.v_page_count * PAGE_SIZE); -- cgit v1.1