diff options
author | dg <dg@FreeBSD.org> | 1995-02-20 17:26:21 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-02-20 17:26:21 +0000 |
commit | 7017e898bd41cf46ee14044f267b20f3df23c717 (patch) | |
tree | b226ce76888ddfefb60c9868b41e6a53f38e3922 | |
parent | 8e1cfbba1e6dd52f71f34c2f45d70533ae6302fa (diff) | |
download | FreeBSD-src-7017e898bd41cf46ee14044f267b20f3df23c717.zip FreeBSD-src-7017e898bd41cf46ee14044f267b20f3df23c717.tar.gz |
VM for the kernel stack and page tables doesn't need to be explicitly
deallocated as it isn't inherited across the fork.
Use vm_map_find not vm_allocate.
Submitted by: John Dyson
-rw-r--r-- | sys/vm/vm_glue.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index f8e290a..dc6f4e8 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -59,7 +59,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_glue.c,v 1.14 1995/02/02 09:08:26 davidg Exp $ + * $Id: vm_glue.c,v 1.15 1995/02/14 06:11:21 phk Exp $ */ #include <sys/param.h> @@ -213,11 +213,8 @@ vm_fork(p1, p2, isvfork) vp = &p2->p_vmspace->vm_map; - /* ream out old pagetables and kernel stack */ - (void) vm_deallocate(vp, addr, UPT_MAX_ADDRESS - addr); - /* get new pagetables and kernel stack */ - (void) vm_allocate(vp, &addr, UPT_MAX_ADDRESS - addr, FALSE); + (void) vm_map_find(vp, NULL, 0, &addr, UPT_MAX_ADDRESS - addr, FALSE); /* force in the page table encompassing the UPAGES */ ptaddr = trunc_page((u_int) vtopte(addr)); |