summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-04 19:40:47 +0000
committerdg <dg@FreeBSD.org>1994-08-04 19:40:47 +0000
commit89acf22c68f6481b15bd1014cb952af42f759760 (patch)
treead1e1e74bf14109608f70de37197b291789f2e40 /sys/vm/vm_map.c
parent3d95e518393e038665b22141c351322c6fbbd556 (diff)
downloadFreeBSD-src-89acf22c68f6481b15bd1014cb952af42f759760.zip
FreeBSD-src-89acf22c68f6481b15bd1014cb952af42f759760.tar.gz
Added some code that was accidently left out early in the 1.x -> 2.0 VM
system conversion. Submitted by: John Dyson
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index c4eeb2d..8ad42fa 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id$
+ * $Id: vm_map.c,v 1.3 1994/08/02 07:55:25 davidg Exp $
*/
/*
@@ -190,6 +190,15 @@ vmspace_alloc(min, max, pageable)
int pageable;
{
register struct vmspace *vm;
+ if (mapvmpgcnt == 0 && mapvm == 0) {
+ int s;
+ mapvmpgcnt = (cnt.v_page_count * sizeof(struct vm_map_entry) + PAGE_SIZE - 1) / PAGE_SIZE;
+ s = splhigh();
+ mapvm = kmem_alloc_pageable(kmem_map, mapvmpgcnt * PAGE_SIZE);
+ splx(s);
+ if (!mapvm)
+ mapvmpgcnt = 0;
+ }
MALLOC(vm, struct vmspace *, sizeof(struct vmspace), M_VMMAP, M_WAITOK);
bzero(vm, (caddr_t) &vm->vm_startcopy - (caddr_t) vm);
OpenPOWER on IntegriCloud