summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-02-26 05:06:35 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-02-26 05:06:35 +0000
commitbdf5e8705d9964417b0f2083918d9ac81874de35 (patch)
treefd77591b3e40f6011381164c86a1ea86584c0878 /sys/kern
parent2eed7ad848eb45da09f4b40a608506ba01970259 (diff)
vm allocation changes for uvm
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exit.c12
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;