shared memory

Conor P. Cahill cpcahil at virtech.uucp
Sat Sep 22 12:37:00 AEST 1990


In article <566 at gestetner.oz> andrew at 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 



More information about the Comp.unix.programmer mailing list