home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!vnet.ibm.com
- From: jimi@vnet.ibm.com (Jim Meyers)
- Message-ID: <19930125.151753.177@almaden.ibm.com>
- Date: Mon, 25 Jan 93 18:15:06 EST
- Newsgroups: comp.lang.c++
- Subject: Re: Shared Memory Objects
- Lines: 36
-
- In <1993Jan25.105459.4799@hellgate.utah.edu> clark%asylum.cs.utah.edu@cs.utah.edu (Charles Clark) writes:
- >
- >Straying from the orignal subject a little, how can the location of the
- >shared memory segments be coordinated? The vtable location is fixed at
- >link edit time, thus one would know then whether there is a conflict.
- >Since the creation and attachment of the shared memory segment is at run-
- >time, how can one ensure that the vm address of each of the cooperating
- >processes will be available?
- >
- > --Charles
-
- This is an implementation-dependent problem. An easy way to do this
- (in AIX) is to place all shared objects (and their vtables) in a single shared
- library. AIX ensures that all processes accessing the shared library will
- load the shared library code at the same virtual address. Thus, the location
- of the vtables is consistent. To ensure that the virtual addresses of
- shared objects is consistent, the process which instantiates the objects can
- send the address to the clients. The clients can control the virtual address
- of the shared memory segment via shmat(), and control the virtual address
- of their "local" the shared memory objects via the new operator's placement
- syntax.
-
- Again, this is for AIX. This solution can also be implemented in OS/2 by
- placing shared memory code (and vtables) in a DLL. Jordan describes Cfront-
- dependent solutions for both SunOS and System V.
-
- --Jim
-
- -------------------------------------------------------------------------
- Jim Meyers | Voice: 919-543-5999
- IBM Networking Systems | Fax: 919-543-1286
- LAN Systems Workstation Technology |
- Research Triangle Park, NC 27709 | Internet: jimi@vnet.ibm.com
- -------------------------------------------------------------------------
-
-
-