diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-05 17:49:07 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-05 17:49:07 +0000 |
commit | 82017a91347ab87ee036a20237f05abc132626c1 (patch) | |
tree | 5d92cbd73aa9046205682463ddda83689f7f4fe4 /sys/kern | |
parent | b119fd7126601ce04b2b7a4f6044323507ece969 (diff) |
If we assume (just pure speculation) that there will be a pmap sometime in
the future that wants to allocate pv entries for every pmap_enter and wants
to allocate those pv entries from kmem_map, it might be a good idea to
init the kmem_map before initializing the kmemusage struct (because kmemusage
allocates memory).
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 60409bb69b5..aee61ff48d6 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.43 2001/12/05 01:57:15 provos Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.44 2001/12/05 17:49:06 art Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -490,11 +490,11 @@ kmeminit() */ kmeminit_nkmempages(); - kmemusage = (struct kmemusage *) uvm_km_zalloc(kernel_map, - (vsize_t)(nkmempages * sizeof(struct kmemusage))); kmem_map = uvm_km_suballoc(kernel_map, (vaddr_t *)&kmembase, (vaddr_t *)&kmemlimit, (vsize_t)(nkmempages * PAGE_SIZE), VM_MAP_INTRSAFE, FALSE, &kmem_map_store); + kmemusage = (struct kmemusage *) uvm_km_zalloc(kernel_map, + (vsize_t)(nkmempages * sizeof(struct kmemusage))); #ifdef KMEMSTATS for (indx = 0; indx < MINBUCKET + 16; indx++) { if (1 << indx >= PAGE_SIZE) |