Path: utzoo!attcan!uunet!crdgw1!underdog!volpe From: volpe@underdog.crd.ge.com (Christopher R Volpe) Newsgroups: comp.unix.wizards Subject: Re: shmat() system call? Message-ID: <11109@crdgw1.crd.ge.com> Date: 16 Aug 90 17:47:23 GMT References: <27@astph.UUCP> <187@n4hgf.Mt-Park.GA.US> Sender: news@crdgw1.crd.ge.com Reply-To: volpe@underdog.crd.ge.com (Christopher R Volpe) Lines: 24 In article , thomas@uplog.se (Thomas Tornblom) writes: |> |>If you must have the same addresses between the processes (which is nice for |>pointers and stuff) I'd pick some high constant address, say 0x[48c]0000000 |>or so that isn't likely to map onto anything on the architectures you're using. |> I was working on a project with a couple of people last summer where we had to use shared memory segments and processes had to exchange pointers. We decided is just wasn't worth it to take chances on a hardcoded address that might fail on any particular run because the kernel couldn't attach the segment at the address specified. So we just did all the pointer exchanging in terms of offsets from the base address of the segment and let each individual process convert between offsets and virtual addresses. It's a little tedious at most (like when you're sharing linked lists), but the added flexibility and reliability is worth the effort, IMHO. ================== Chris Volpe G.E. Corporate R&D volpecr@crd.ge.com