diff options
author | dg <dg@FreeBSD.org> | 1994-08-04 19:40:47 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-08-04 19:40:47 +0000 |
commit | 89acf22c68f6481b15bd1014cb952af42f759760 (patch) | |
tree | ad1e1e74bf14109608f70de37197b291789f2e40 /sys | |
parent | 3d95e518393e038665b22141c351322c6fbbd556 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/vm/vm_map.c | 11 |
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); |