summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-06-06 22:17:08 +0000
committerpeter <peter@FreeBSD.org>2001-06-06 22:17:08 +0000
commit0732738ec450bcfa11cfc73cc53b16c92c4a5e9a (patch)
tree58ecfe664c4cc2fd28db0c76b33469ccff8dee55 /sys/kern/kern_malloc.c
parent1127de3ac7859c762c70d8deecce993108ef82f3 (diff)
downloadFreeBSD-src-0732738ec450bcfa11cfc73cc53b16c92c4a5e9a.zip
FreeBSD-src-0732738ec450bcfa11cfc73cc53b16c92c4a5e9a.tar.gz
Make the TUNABLE_*() macros look and behave more consistantly like the
SYSCTL_*() macros. TUNABLE_INT_DECL() was an odd name because it didn't actually declare the int, which is what the name suggests it would do.
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 44666b4..f460d53 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -424,7 +424,6 @@ kmeminit(dummy)
register long indx;
u_long npg;
u_long mem_size;
- u_long xvm_kmem_size;
#if ((MAXALLOCSAVE & (MAXALLOCSAVE - 1)) != 0)
#error "kmeminit: MAXALLOCSAVE not power of 2"
@@ -450,21 +449,21 @@ kmeminit(dummy)
* Note that the kmem_map is also used by the zone allocator,
* so make sure that there is enough space.
*/
- xvm_kmem_size = VM_KMEM_SIZE;
+ vm_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) > xvm_kmem_size)
- xvm_kmem_size = mem_size / VM_KMEM_SIZE_SCALE;
+ if ((mem_size / VM_KMEM_SIZE_SCALE) > vm_kmem_size)
+ vm_kmem_size = mem_size / VM_KMEM_SIZE_SCALE;
#endif
#if defined(VM_KMEM_SIZE_MAX)
- if (xvm_kmem_size >= VM_KMEM_SIZE_MAX)
- xvm_kmem_size = VM_KMEM_SIZE_MAX;
+ if (vm_kmem_size >= VM_KMEM_SIZE_MAX)
+ vm_kmem_size = VM_KMEM_SIZE_MAX;
#endif
/* Allow final override from the kernel environment */
- TUNABLE_INT_FETCH("kern.vm.kmem.size", xvm_kmem_size, vm_kmem_size);
+ TUNABLE_INT_FETCH("kern.vm.kmem.size", &vm_kmem_size);
/*
* Limit kmem virtual size to twice the physical memory.
OpenPOWER on IntegriCloud