diff options
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 8fe0b3302bb..a23a4aaac57 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.14 1999/01/11 20:30:40 niklas Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.15 1999/02/26 05:06:34 art Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -77,6 +77,10 @@ #include <vm/vm.h> #include <vm/vm_kern.h> +#if defined(UVM) +#include <uvm/uvm_extern.h> +#endif + /* * exit -- * Death of process. @@ -156,9 +160,15 @@ exit1(p, rv) * Can't free the entire vmspace as the kernel stack * may be mapped within that space also. */ +#if defined(UVM) + if (vm->vm_refcnt == 1) + (void) uvm_deallocate(&vm->vm_map, VM_MIN_ADDRESS, + VM_MAXUSER_ADDRESS - VM_MIN_ADDRESS); +#else if (vm->vm_refcnt == 1) (void) vm_map_remove(&vm->vm_map, VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS); +#endif if (SESS_LEADER(p)) { register struct session *sp = p->p_session; |