summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>1999-01-08 14:20:54 +0000
committerluoqi <luoqi@FreeBSD.org>1999-01-08 14:20:54 +0000
commit362bef31c50d2950b07d010176376dc219352a18 (patch)
treee377e5ce622d7d23601152db04c08f01d07eb911 /sys/i386
parent3f69afe7b1d04e8e55d0cabe7b2df1dec9c84dc9 (diff)
downloadFreeBSD-src-362bef31c50d2950b07d010176376dc219352a18.zip
FreeBSD-src-362bef31c50d2950b07d010176376dc219352a18.tar.gz
Allocate kernel page table object (kptobj) before any kmem_alloc calls.
On a system with a large amount of ram (e.g. 2G), allocation of per-page data structures (512K physical pages) could easily bust the initial kernel page table (36M), and growth of kernel page table requires kptobj.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/pmap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 79cc809..92c3d2e 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.215 1998/12/07 21:58:18 archie Exp $
+ * $Id: pmap.c,v 1.216 1999/01/07 22:15:51 dt Exp $
*/
/*
@@ -606,6 +606,11 @@ pmap_init(phys_start, phys_end)
int initial_pvs;
/*
+ * object for kernel page table pages
+ */
+ kptobj = vm_object_allocate(OBJT_DEFAULT, NKPDE);
+
+ /*
* calculate the number of pv_entries needed
*/
vm_first_phys = phys_avail[0];
@@ -639,10 +644,6 @@ pmap_init(phys_start, phys_end)
pvinit = (struct pv_entry *) kmem_alloc(kernel_map,
initial_pvs * sizeof (struct pv_entry));
zbootinit(pvzone, "PV ENTRY", sizeof (struct pv_entry), pvinit, pv_npg);
- /*
- * object for kernel page table pages
- */
- kptobj = vm_object_allocate(OBJT_DEFAULT, NKPDE);
/*
* Now it is safe to enable pv_table recording.
OpenPOWER on IntegriCloud