Boost logo

Boost Users :

From: sankar lingam (shankar.nitc_at_[hidden])
Date: 2008-03-20 00:50:06


Thank you very much..I could see all the processes mapping the shared memory
in the
same address and that is why my program doesnot crash..

But cant this change be requested to Boost Multi.Array?? It would be really
useful
to allocate a multi array on shared memory..Would the multi array adaptation
be
difficult for the multi array developers (i meant to change it)? or should I
raise a feature
request for the same..It would be wonderful if the feature comes along with
the
boost 1.35 release...

On Wed, Mar 19, 2008 at 2:23 PM, Ion Gaztañaga <igaztanaga_at_[hidden]> wrote:

> sankar lingam wrote:
> >
> >
> > I made the following wrapper over the Boost.InterProcess
> > Allocator,
> >
> > [...]
> >
> > and used the shared_allocator as the allocator to Boost.multi_array and
> >
> > I find it working fine. The boost multi_array allocates and deallocates
> > the memory
> >
> > through shared_allocator.
> >
> > Am I doing something wrong here??Can it be used this way??
>
> MultiArray will store a raw pointer as a member. This means that if two
> processes map the shared memory in different addresses, the process that
> didn't create the MultiArray will crash.
>
> This can only work if all processes exactly map the shared memory in the
> same address. MultiArray adaptation would require using
> allocator::pointer instead of raw pointers as member pointers. In case
> you find it useful, latest (SVN) Boost.Multiindex is compatible with
> Boost.Interprocess.
>
> Regards,
>
> 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