Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-16-2005, 08:39 AM   #1
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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.
Old 03-16-2005, 09:57 AM   #2
LQ Newbie
Registered: Nov 2003
Location: Sweden
Distribution: gentoo
Posts: 11

Rep: Reputation: 0
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...
Old 03-16-2005, 10:12 AM   #3
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Original Poster
Rep: Reputation: 67
It is certainly a temporary hacked solutions. We are going to be using Tuxedo in the future..


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamically add objects in JavaScript djgerbavore Programming 1 03-11-2005 09:41 PM
any links on linking, loading shared libraries, shared objects. etc? ananthbv Programming 0 02-03-2005 07:47 AM
Creating Shared objects Anup Kumar Programming 1 09-11-2004 11:45 PM
g++ missing shared objects pinguwin Linux - Software 0 05-27-2004 08:38 AM
problem in dynamically loading the shared object sumit Programming 1 01-10-2002 03:15 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration