summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-02-22 16:08:02 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-02-22 16:08:02 +0000
commit5dd0b2887a84d602f92f9be02ecd79834e0bc6c6 (patch)
treeab3a99c7d21244530be565340776b5d880efc0e4 /sys/kern/kern_exec.c
parent01ec2d57bfa74a2ca535c80eb999cbc165f3d76c (diff)
ELF uses more than 5 vmcmds by default, so grow the default vmcmd set size
to 8. At the same time it seemed like a good idea to avoid to always malloc a new vmcmd array, so put the default sized array into struct exec_vmcmd_set. We might want to make a linked list of vmcmd arrays or exec_vmcmd_sets instead of reallocating them some time in the future, but right now this seems like a waste of time.
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 71c068a9348..3344e664d33 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.46 2000/11/16 20:02:16 provos Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.47 2001/02/22 16:08:01 art Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -269,7 +269,8 @@ sys_execve(p, v, retval)
pack.ep_hdrvalid = 0;
pack.ep_ndp = &nid;
pack.ep_emul_arg = NULL;
- pack.ep_vmcmds.evs_cnt = 0;
+ pack.ep_vmcmds.evs_cnt = EXEC_DEFAULT_VMCMD_SETSIZE;
+ pack.ep_vmcmds.evs_cmds = pack.ep_vmcmds.evs_start;
pack.ep_vmcmds.evs_used = 0;
pack.ep_vap = &attr;
pack.ep_emul = &emul_native;