LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Dynamically sized objects in shared memory (https://www.linuxquestions.org/questions/programming-9/dynamically-sized-objects-in-shared-memory-302271/)

jtshaw 03-16-2005 08:39 AM

Dynamically sized objects in shared memory
 
I'm working on a project which includes several (read: about 30) C++ processes and a couple of Java processes. At some point, more then one of these C++ processes are going to need to read data from an instance of a java process. I am accomplishing this by created a shared memory segment and putting an instance of the JNI communication object in it. This *seams* to be working just fine... the only thing that worries me is if something in that object in shared memory has dynamic size and causes the object to grow bigger then the shared segment size.

Has anyone ever shared a dynamic (or possibly dynamic... I don't have any control over what this object does) in a shared memory segment before? If so... how do you go about doing it to ensure the program doesn't have suffer from particularly nasty behavior.

andvin 03-16-2005 09:57 AM

I haven't done anything like what you are suggesting, but it sounds a bit ugly... ;)

I think I would have gone for CORBA or implementing my own object serialization through a socket instead...

jtshaw 03-16-2005 10:12 AM

It is certainly a temporary hacked solutions. We are going to be using Tuxedo in the future..


All times are GMT -5. The time now is 01:50 PM.