From ff16eeefb04cc2daccaced1d85fcf255996b13b2 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Mon, 20 Feb 1995 17:26:21 +0000 Subject: [PATCH] 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 --- sys/vm/vm_glue.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index f8e290ae52ff..dc6f4e899b0d 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 @@ -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));