home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!spool.mu.edu!agate!netsys!news!lsi!mhost!cl301!ameesh
- From: ameesh@lsil.com (Ameesh Desai)
- Newsgroups: comp.lang.c++
- Subject: Re: Linked Lists in Shared Memory:
- Message-ID: <1992Nov6.185024.14778@lsil.com>
- Date: 6 Nov 92 18:50:24 GMT
- References: <1992Nov5.090303.17760@ermes.enea.se>
- Sender: news@lsil.com (news caster)
- Reply-To: ameesh@lsil.com
- Organization: LSI Logic Corporation
- Lines: 44
- Nntp-Posting-Host: cl301
-
- In article 17760@ermes.enea.se, eny@ermes.enea.se (Erik Nykvist) writes:
-
- [stuff deleted]
-
- >
- >I have used a technique based on the new-operator with placement-syntax.
- >If we have objects that can only be accessed by one process at the time it
- >is possible to adjust the this-pointer using this operator.
- >
- >As long as the constructor used doesn't mutate the data members the affect of
- >using this operator is only adjustment of the vtbl-pointer.
- >
-
- [ stuff deleted ]
-
- >// We also use the placement syntax to allocate the shared object.
- >=========
- >PROCESS 1
- >=========
- >{
- > Shared* sp = new (shared_mem) Shared;
- > Lock lock(*sp);
- > // Adjust vtbl
- > new (shared_mem) Shared(IN_SHARED_MEMORY);
-
-
- I am confused ... do you plan to allow creation of the object in one process and
- its access in another. If so I am not sure what effect the above new statement
- has - how does it fix the vtbl ? How does it effect the 'this' ptr - which 'this' ?
-
- [stuff deleted]
- >
- >Erik Nyquist, ENEA DATA AB, erny@enea.se
- > eny@ermes.enea.se
-
-
- Ameesh
-
- ---
- ______________________________ o__
- | _ /| Ameesh Desai \ ,>/_
- | \`O.o' LSI Logic Corp. \__(_)`(_)_ email: ameesh@lsil.com
- | =(_|_)= MS E192, 1501 McCarthy Blvd. \ fax : (408) 433-6802
- |____U_______Milpitas, CA 95035____________\____________voice: (408) 433-4097
-