Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!psuvax1!rutgers!sun-barr!newstop!eastapps!playroom!gaffa.East.Sun.COM!cliffs From: cliffs@gaffa.East.Sun.COM (Clifford C. Skolnick) Newsgroups: comp.unix.wizards Subject: Re: Pointers in Shared Memory Keywords: pointers, shared memory Message-ID: <535@playroom.UUCP> Date: 17 Apr 91 18:26:25 GMT References: <2417@taurus.BITNET> Sender: news@playroom.UUCP Organization: Sun Microsystems, Inc. Rochester, NY Lines: 17 In article <2417@taurus.BITNET> writes: >I have some doubts concerning the use of pointers inside shared memory >obtained with SysV IPC functions. > >However, it is possible to store pointers INSIDE the shared memory, >and also to another shared memory segment. Careful here too. Store the pointers as offsetts from the address where teh segment is attached. This will allow a different process who has not attached the segment at the same address (by choice, or just can't do it) to still use the data. You will experience a slight performance hit, but a slow working program is better than a fast one that does not work. -- Cliff Skolnick | "When routine life's hard, and inhibitions are low, and cliffs@sun.com | resentment lies hide, but emotions run through, and we're (716) 385-5049 | changing our ways, taking different roads. Love, love I think. I am. | will tear us apart, again." -- Joy Division