From 45c5586293413f313cff203cff0202d3d1cc1eeb Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 30 Nov 1995 07:58:50 +0000 Subject: 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. --- sys/kern/sysv_shm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/sysv_shm.c') 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); -- cgit v1.1