summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2007-05-31 22:52:15 +0000
committerattilio <attilio@FreeBSD.org>2007-05-31 22:52:15 +0000
commit7dd8ed88a925a943f1963baa072f4b6c6a8c9930 (patch)
tree10bf0f11ceeb18c6b03947eb85223abbbbf9cc67 /sys/kern/kern_malloc.c
parent4681b4098bbf12784d009826b2223ace96a2306b (diff)
downloadFreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.zip
FreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.tar.gz
Revert VMCNT_* operations introduction.
Probabilly, a general approach is not the better solution here, so we should solve the sched_lock protection problems separately. Requested by: alc Approved by: jeff (mentor)
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 219d47d..9a99539 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -547,7 +547,7 @@ kmeminit(void *dummy)
* so make sure that there is enough space.
*/
vm_kmem_size = VM_KMEM_SIZE + nmbclusters * PAGE_SIZE;
- mem_size = VMCNT_GET(page_count);
+ mem_size = cnt.v_page_count;
#if defined(VM_KMEM_SIZE_SCALE)
vm_kmem_size_scale = VM_KMEM_SIZE_SCALE;
@@ -585,8 +585,8 @@ kmeminit(void *dummy)
* to something sane. Be careful to not overflow the 32bit
* ints while doing the check.
*/
- if (((vm_kmem_size / 2) / PAGE_SIZE) > VMCNT_GET(page_count))
- vm_kmem_size = 2 * VMCNT_GET(page_count) * PAGE_SIZE;
+ if (((vm_kmem_size / 2) / PAGE_SIZE) > cnt.v_page_count)
+ vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE;
/*
* Tune settings based on the kernel map's size at this time.
@@ -646,8 +646,7 @@ malloc_init(void *data)
struct malloc_type_internal *mtip;
struct malloc_type *mtp;
- KASSERT(VMCNT_GET(page_count) != 0,
- ("malloc_register before vm_init"));
+ KASSERT(cnt.v_page_count != 0, ("malloc_register before vm_init"));
mtp = data;
mtip = uma_zalloc(mt_zone, M_WAITOK | M_ZERO);
OpenPOWER on IntegriCloud