home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16139 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  1.9 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!netsys!news!lsi!mhost!cl301!ameesh
  2. From: ameesh@lsil.com (Ameesh Desai)
  3. Newsgroups: comp.lang.c++
  4. Subject: C++ and Shared Memory (Was: Linked Lists in Shared Memory: )
  5. Message-ID: <1992Nov11.202728.7564@lsil.com>
  6. Date: 11 Nov 92 20:27:28 GMT
  7. References: <1992Nov10.114435.22735@ermes.enea.se>
  8. Sender: news@lsil.com (news caster)
  9. Reply-To: ameesh@lsil.com
  10. Organization: LSI Logic Corporation
  11. Lines: 35
  12. Nntp-Posting-Host: cl301
  13.  
  14. In article 22735@ermes.enea.se, eny@ermes.enea.se (Erik Nykvist) writes:
  15. >> >=========
  16.  
  17. [stuff deleted]
  18.  
  19. >The proposed technique uses the new-operator  with placement-syntax to
  20. >fix the vtbl-pointer in the object. 
  21. >I have not thought about this very much. I have written ONE example
  22. >program that uses this. 
  23. >My idea is that if you know the address of the object in shared memory
  24. >you could access it after having fixed the vtbl-pointer.
  25. >If you fork your process it is NOT necessary to fix the vtbl-pointer
  26. >because the forked process has the vtbl at the same address as the
  27. >parent process.
  28. >
  29. >Erik Nyquist
  30. >
  31.  
  32.  
  33. I guess if all processes that were to access the shared mem were to have the
  34. same parent (forked from one single process), what you say is true. However,
  35. in a more general case, you would like to provide access to the shared 
  36. memory to processes that do not share the same parent.
  37.  
  38. It is not clear to me if there is a "clean" way to share the pages simultaneously
  39. accross such processes. (when the pages contain C++ objects with vtbl ptrs).
  40.  
  41. Ameesh
  42.  
  43. ---
  44. ______________________________     o__            
  45. | _   /|     Ameesh Desai     \    ,>/_                              
  46. | \`O.o'     LSI Logic Corp.   \__(_)`(_)_              email: ameesh@lsil.com
  47. | =(_|_)=    MS E192, 1501 McCarthy Blvd. \             fax  : (408) 433-6802
  48. |____U_______Milpitas, CA 95035____________\____________voice: (408) 433-4097 
  49.