Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!bionet!agate!ucbvax!hplabs!hpda!hpcupt1!hpisod2!decot From: decot@hpisod2.cup.hp.com (Dave Decot) Newsgroups: comp.sys.hp Subject: Re: shared memory on fixed address on 9000/825 Message-ID: <16710079@hpisod2.cup.hp.com> Date: 28 Mar 91 01:37:25 GMT References: <1991Mar26.190339.13805@rusmv1.rus.uni-stuttgart.de> Organization: Hewlett Packard, Cupertino Lines: 37 > On several *ixes i can supply the shmat-call with a address, at which i > want to access the shared memory. This works apparently also on a 9000/375 > with HP-UX 7.0. > The man page on the 825 claims however, that this is not possible on this > machine... The man page is correct. > So, PLEASE, why ? And is there a workaround for this ? It has to do with the s800 memory architecture. Virtual addresses in user processes are unique across the whole system. In fact, it is possible to determine from a given virtual address which process it belongs to. If the s800 permitted user-supplied addresses to be added to the address space of the current process, this would violate that arrangement. The workaround depends, as always, on what you are trying to do. Since a shared memory segment will always be attached at a different address in different processes, addresses in one process are not directly usable in another process. If you want to share data structures between processes via shared memory, you can encode any addresses in the data structure as offsets from the beginning of the shared memory segment, and add the beginning address in each process to the offset to locate the data in that process. > Many, many, thanks in advance, You're welcome. Dave Decot, HP DISCLAIMER: The text above is provided for infomational purposes only; it is the author's opinion and not necessarily that of Hewlett-Packard Company.