summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-01-21 21:54:32 +0000
committermsmith <msmith@FreeBSD.org>1999-01-21 21:54:32 +0000
commitb8598e583edea9bfd92993ac2988d8a0f5449fad (patch)
tree9957bc53aaca0642fcdc36fbf6a5290b41f08a61 /sys/kern/kern_malloc.c
parentd92556606fda6dd62bb19f70e29265013e58ca83 (diff)
downloadFreeBSD-src-b8598e583edea9bfd92993ac2988d8a0f5449fad.zip
FreeBSD-src-b8598e583edea9bfd92993ac2988d8a0f5449fad.tar.gz
Allow VM_KMEM_SIZE to be tuned from the kernel environment. This tuning
value *completely* overrides any value precalculated by the kernel.
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c7
1 files changed, 6 insertions, 1 deletions
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);
OpenPOWER on IntegriCloud