LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

Rep: Reputation: 66
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
andvin
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
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

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


Reply


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


All times are GMT -5. The time now is 07:06 PM.

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