Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!bingvaxu!sunybcs!rutgers!att!mtuxo!mtgzz!drutx!druin!ldg From: ldg@druin.ATT.COM (Doug Gibbons) Newsgroups: comp.lang.c++ Subject: Re: Objects and Shared Memory Message-ID: <420@druin.ATT.COM> Date: 13 Apr 89 16:11:23 GMT Distribution: comp Organization: AT&T, Denver, CO Lines: 20 Here's another trick for passing objects with virtual functions through shared memory: 1) Use +e0/+e1 to create a vtbl.c 2) Load vtbl.o at the same place in all a.outs that are to share objects. This can be done simply by passing vtbl.o as the first file to ld. 3) When objects are placed in shared memory, their vtbl ptrs are valid for any a.out address space, even though the contents of the vtbls may be different in each space. -- -------------------------------------------------------------------------------- -- Doug Gibbons | ldg@druhi.ATT.COM or att!druhi!ldg -- AT&T Bell Laboratories -- Denver CO