summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1995-11-30 07:58:50 +0000
committerjulian <julian@FreeBSD.org>1995-11-30 07:58:50 +0000
commit45c5586293413f313cff203cff0202d3d1cc1eeb (patch)
treef282f14b99071bf6b6716abef33bb41b78ec21e1
parent68263369e2dd33dce0b4b59b7886cca7994c80a2 (diff)
downloadFreeBSD-src-45c5586293413f313cff203cff0202d3d1cc1eeb.zip
FreeBSD-src-45c5586293413f313cff203cff0202d3d1cc1eeb.tar.gz
Submitted by: jb@cimlogic.com.au (John Birrell)
Obtained from: NetBSD as well (He submitted it there too) make sure that teh shm region is beyond the sum of the text and data segs as it was big progs could collide with the shm region.
-rw-r--r--sys/kern/sysv_shm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index a396ea3..c9e1221 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -1,4 +1,4 @@
-/* $Id: sysv_shm.c,v 1.9 1995/09/09 18:10:09 davidg Exp $ */
+/* $Id: sysv_shm.c,v 1.10 1995/10/21 19:50:00 bde Exp $ */
/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */
/*
@@ -244,7 +244,7 @@ shmat(p, uap, retval)
return EINVAL;
} else {
/* This is just a hint to vm_mmap() about where to put it. */
- attach_va = round_page(p->p_vmspace->vm_daddr + MAXDSIZ);
+ attach_va = round_page(p->p_vmspace->vm_taddr + MAXTSIZ + MAXDSIZ);
}
error = vm_mmap(&p->p_vmspace->vm_map, &attach_va, size, prot,
VM_PROT_DEFAULT, flags, (caddr_t) uap->shmid, 0);
OpenPOWER on IntegriCloud