summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKen Smith <kensmith@FreeBSD.org>2004-05-05 19:38:28 +0000
committerKen Smith <kensmith@FreeBSD.org>2004-05-05 19:38:28 +0000
commit17fa1e6b7178831460a34c5183e6a55cc68ea47b (patch)
tree65126199bd748840b02573c671651e30e23e01ea /sys
parenta45fe8894cbc4c4972f69ca97a5d41dd327d2629 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 816ae6393b2e..f9d47c8538f8 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2778,7 +2778,8 @@ vmspace_exec(struct proc *p) {
newvmspace = vmspace_alloc(map->min_offset, map->max_offset);
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