Xref: utzoo comp.lang.c:32041 comp.unix.programmer:76 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.lang.c,comp.unix.programmer Subject: Re: shared memory Keywords: shared memory Message-ID: <1990Sep22.023700.13632@virtech.uucp> Date: 22 Sep 90 02:37:00 GMT References: <566@gestetner.oz> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 16 In article <566@gestetner.oz> andrew@gestetner.oz (Andrew Hunt) writes: >Does anyone know what areas of memory can be legally attached to >shared memory? This is a very OS dependent portion of the code. What I usually do is attach a segment at the default address and compare the value of the pointer to the value of a malloc'd pointer (yes I know that comparing pointers to unrelated objects is not always defined). If the two are too close, I detach the segment and re-attache it at a much higher address (like 1MB higher). -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170