|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
I am pondering the next question:
Can I safely sare objects that have virtual functions (i.e. have virtual function table pointers) between two processes ? Where will the pointers point to in each process ? What I am afraid of is that in the creating process the pointer will indeed point to the virtual function table, but in the sharing process that pointer will point at junk. Can anyone calm me or maybe confirm my fears ? Thank you ! |
| Sponsored Links | ||
|
|
|
|||
|
If the virtual function table is in process A, then the pointer to the table is in the process address space of process A and has no meaning in process B, so if you pass the pointer to process B, it would be meaningless. I don't know what OS you're using, but have you thought of using shared libraries to share the code. If that isn't an option, what about shared memory?
|
|
|||
|
more about shared objects
Hi, to be more specific :
I am using AIX on R6k, and shared memory is an option. How can that approach solve the problem ? Isn't szared memory mapped into each process's vitual address space anyway ? And what is the deal about shared libraries ? what are those ? |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pointers | Milla | Programming | 2 | 11-03-2007 05:13 AM |
| Pure Virtual Function in C++ | krishna_sicsr | Programming | 1 | 06-03-2007 05:11 PM |
| pointers | areef4u | Programming | 4 | 08-05-2006 06:08 PM |
| sharing of IP address for load sharing avoiding virtual server & redirection machine | Rakesh Ranjan | IP Networking | 2 | 08-25-2005 02:45 PM |
| Regarding Function and Pointers. | S.Vishwanath | Programming | 0 | 05-25-2004 09:15 AM |