summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-07-07 23:43:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-07-07 23:43:05 +0000
commitcd1c07d3baff0d7820bc33af4c1cc0411babb92c (patch)
tree683a1d52d7325b0fc4a373acb085cc90118637c4 /sys/kern/kern_exec.c
parent832c4abf6f856d5ad03a9228db1db6d9e659df6c (diff)
clear vm_dused at exec time, since we are potentially re-using the vmspace;
fixes resource accounting in a mmap malloc world ok "too busy but looks right" tedu, tdeval
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 3eb4cee8eb8..5d2126c2004 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.92 2005/04/11 20:05:51 deraadt Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.93 2005/07/07 23:43:04 deraadt Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -417,6 +417,7 @@ sys_execve(p, v, retval)
vm->vm_tsize = btoc(pack.ep_tsize);
vm->vm_daddr = (char *)pack.ep_daddr;
vm->vm_dsize = btoc(pack.ep_dsize);
+ vm->vm_dused = 0;
vm->vm_ssize = btoc(pack.ep_ssize);
vm->vm_maxsaddr = (char *)pack.ep_maxsaddr;
vm->vm_minsaddr = (char *)pack.ep_minsaddr;