|
Boost Users : |
Subject: Re: [Boost-users] Boost.Interprocess with complex/nested classes
From: Rick Hullinger (rhullinger_at_[hidden])
Date: 2010-08-13 07:57:03
Thanks, Ion. Not really what I wanted to hear, but it is what it is.
Last night I saw a message to the group about using Boost.MPI and
serialization. The objects I need to share between processes are
already support serialization, so I'm going to look into the MPI
library next, hopefully that will work.
rick.
2010/8/13 Ion Gaztañaga <igaztanaga_at_[hidden]>:
> On 11/08/2010 21:33, Rick Hullinger wrote:
>>
>> I think I finally have a grasp on the basics of the boost:interprocess
>> library, and I've been using it successfully when dealing with
>> relatively simple classes that contain a few member variables that are
>> all standard data types.
>>
>> However, I am now faced with the problem of pushing a rather complex
>> class out into interprocess shared memory and I'm having no luck at
>> all. I'm hoping someone here can help (or can steer me towards an
>> alternate solution). Stripping it down to what I hope are the basics,
>> I have something along these lines:
>
> You can't share any structure that contains raw pointers, because shared
> memory is mapped in different address in each process. So you need to
> replace every member with boost.interprocess alternatives. And if those
> structures are filled by GNu Scientifice Library, pointers would point to
> process-local memory (malloc-heap) and that memory isn't shareable with
> other processes.
>
> Best,
>
> Ion
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net