Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!codas!peora!ucf-cs!novavax!hcx1!notes From: notes@hcx1.UUCP Newsgroups: comp.unix.questions Subject: Sys V shared mem ?? Message-ID: <123@hcx1.UUCP> Date: Thu, 13-Nov-86 18:09:43 EST Article-I.D.: hcx1.123 Posted: Thu Nov 13 18:09:43 1986 Date-Received: Sat, 15-Nov-86 05:05:03 EST Sender: notes@hcx1.UUCP Organization: Harris CSD, Fort Lauderdale, Florida Lines: 25 Nf-ID: #N:hcx1:48200001:000:786 Nf-From: hcx1!gwp Nov 13 18:08:00 1986 I have a question concerning System V.2 and shared memory. It appears (and I may be wrong) possible to do a shared memory attach into your data region (we have System V source in house and I can't find any checks that prevent this) . That is something like: int shmid, shmflg; char buf[1024]; . . (get shmid, set shmflg, etc.) . . shmat (shmid, buf, shflg); and access the shared memory segemnt as buf[n]. The reason for doing something like this is to save one indirection over the normal method of just letting shmat() return a pointer the shared memory segment. My question is: What happens to the original contents of buf and all the data objects declared after it ? -------- Gil Pilz ...!allegra!novavax!hcx1!gwp