summaryrefslogtreecommitdiff
path: root/sys/compat/svr4/svr4_misc.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-06-27 04:58:50 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-06-27 04:58:50 +0000
commit2d089dc551efe8a4004f99b557081ea313891050 (patch)
tree015a91c1480d57159d83fa495068cb7eed8d110b /sys/compat/svr4/svr4_misc.c
parentedc9c7f6c9998a46c76c042e4ec02f6dfd1e2f8b (diff)
Remove old vm.
Diffstat (limited to 'sys/compat/svr4/svr4_misc.c')
-rw-r--r--sys/compat/svr4/svr4_misc.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index ca8883ca487..f8cde341b94 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_misc.c,v 1.31 2001/06/21 13:08:15 niklas Exp $ */
+/* $OpenBSD: svr4_misc.c,v 1.32 2001/06/27 04:58:42 art Exp $ */
/* $NetBSD: svr4_misc.c,v 1.42 1996/12/06 03:22:34 christos Exp $ */
/*
@@ -90,9 +90,7 @@
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_extern.h>
-#endif
static __inline clock_t timeval_to_clock_t __P((struct timeval *));
static int svr4_setinfo __P((struct proc *, int, svr4_siginfo_t *));
@@ -583,18 +581,10 @@ svr4_sys_sysconfig(p, v, retval)
*retval = 3; /* XXX: real, virtual, profiling */
break;
case SVR4_CONFIG_PHYS_PAGES:
-#if defined(UVM)
*retval = uvmexp.npages;
-#else
- *retval = cnt.v_free_count; /* XXX: free instead of total */
-#endif
break;
case SVR4_CONFIG_AVPHYS_PAGES:
-#if defined(UVM)
*retval = uvmexp.active; /* XXX: active instead of avg */
-#else
- *retval = cnt.v_active_count; /* XXX: active instead of avg */
-#endif
break;
default:
return EINVAL;
@@ -683,15 +673,11 @@ svr4_sys_break(p, v, retval)
DPRINTF(("break(3): old %lx new %lx diff %x\n", old, new, diff));
if (diff > 0) {
-#if defined(UVM)
rv = uvm_map(&vm->vm_map, &old, diff, NULL, UVM_UNKNOWN_OFFSET,
UVM_MAPFLAG(UVM_PROT_ALL, UVM_PROT_ALL, UVM_INH_COPY,
UVM_ADV_NORMAL,
UVM_FLAG_AMAPPAD|UVM_FLAG_FIXED|
UVM_FLAG_OVERLAY|UVM_FLAG_COPYONW));
-#else
- rv = vm_allocate(&vm->vm_map, &old, diff, FALSE);
-#endif
if (rv != KERN_SUCCESS) {
uprintf("sbrk: grow failed, return = %d\n", rv);
return ENOMEM;
@@ -699,11 +685,7 @@ svr4_sys_break(p, v, retval)
vm->vm_dsize += btoc(diff);
} else if (diff < 0) {
diff = -diff;
-#if defined(UVM)
rv = uvm_deallocate(&vm->vm_map, new, diff);
-#else
- rv = vm_deallocate(&vm->vm_map, new, diff);
-#endif
if (rv != KERN_SUCCESS) {
uprintf("sbrk: shrink failed, return = %d\n", rv);
return ENOMEM;