summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-07-05 08:52:54 +0000
committermsmith <msmith@FreeBSD.org>1999-07-05 08:52:54 +0000
commitaf7615d39a0a05294c977a44b96e0abd75a0e723 (patch)
treed39acb1756b5a1342da8e9e7436ed7232c818bf1 /sys/kern/kern_malloc.c
parent36e6752409ff0942f4248605bd0089086ffb9dfe (diff)
downloadFreeBSD-src-af7615d39a0a05294c977a44b96e0abd75a0e723.zip
FreeBSD-src-af7615d39a0a05294c977a44b96e0abd75a0e723.tar.gz
Move the initialisation/tuning of nmbclusters from param.c/machdep.c
into uipc_mbuf.c. This reduces three sets of identical tunable code to one set, and puts the initialisation with the mbuf code proper. Make NMBUFs tunable as well. Move the nmbclusters sysctl here as well. Move the initialisation of maxsockets from param.c to uipc_socket2.c, next to its corresponding sysctl. Use the new tunable macros for the kern.vm.kmem.size tunable (this should have been in a separate commit, whoops).
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 0b300c2..4b3a42a 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.55 1999/05/06 18:12:42 peter Exp $
+ * $Id: kern_malloc.c,v 1.56 1999/05/12 11:11:27 bde Exp $
*/
#include "opt_vm.h"
@@ -419,22 +419,21 @@ kmeminit(dummy)
* Note that the kmem_map is also used by the zone allocator,
* so make sure that there is enough space.
*/
- vm_kmem_size = VM_KMEM_SIZE;
+ xvm_kmem_size = VM_KMEM_SIZE;
mem_size = cnt.v_page_count * PAGE_SIZE;
#if defined(VM_KMEM_SIZE_SCALE)
- if ((mem_size / VM_KMEM_SIZE_SCALE) > vm_kmem_size)
- vm_kmem_size = mem_size / VM_KMEM_SIZE_SCALE;
+ if ((mem_size / VM_KMEM_SIZE_SCALE) > xvm_kmem_size)
+ xvm_kmem_size = mem_size / VM_KMEM_SIZE_SCALE;
#endif
#if defined(VM_KMEM_SIZE_MAX)
- if (vm_kmem_size >= VM_KMEM_SIZE_MAX)
- vm_kmem_size = VM_KMEM_SIZE_MAX;
+ if (xvm_kmem_size >= VM_KMEM_SIZE_MAX)
+ xvm_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;
+ TUNABLE_INT_FETCH("kern.vm.kmem.size", xvm_kmem_size, vm_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