diff options
-rw-r--r-- | sys/vm/vm_map.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index d4a7fe6..b5897ed 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -2789,7 +2789,8 @@ vmspace_exec(struct proc *p, vm_offset_t minuser, vm_offset_t maxuser) GIANT_REQUIRED; newvmspace = vmspace_alloc(minuser, maxuser); bcopy(&oldvmspace->vm_startcopy, &newvmspace->vm_startcopy, - (caddr_t) (newvmspace + 1) - (caddr_t) &newvmspace->vm_startcopy); + (caddr_t) &newvmspace->vm_endcopy - + (caddr_t) &newvmspace->vm_startcopy); /* * This code is written like this for prototype purposes. The * goal is to avoid running down the vmspace here, but let the |