Boost logo

Boost Users :

Subject: Re: [Boost-users] How to keep a pointer on a shared data in a boost shared memory segment
From: jucin loic (luaevat_at_[hidden])
Date: 2019-03-23 15:13:44


Yes, this is a good idea, but you got wrong on my real problem:
I agree, and but I don't want to share the pointers between different
process. I want to get the pointer to the shared data using
managed_shared_memory::construct() or managed_shared_memory::find() and
then store this pointer. And do this for of course all different processes.
Please, read the SO question, I described there more precisely my problem,
and even provided a READY-TO-USE example (
https://stackoverflow.com/questions/55195149/how-to-keep-a-pointer-on-a-shared-data-in-a-boost-shared-memory-segment
)
 Thank you in advance !

Le jeu. 21 mars 2019 à 14:10, Klebsch, Mario via Boost-users <
boost-users_at_[hidden]> a écrit :

> Hi,
>
> > To solve this, you store indexes or offsets relative to the base of the
> shared memory itself (or some other known field within the shared memory)
> instead of a "real" pointer.
>
> I once saw a system, where pointers in shared memory were self-relative.
> It should be possible to wrap them in a pointer-like class.
>
> 73, Mario
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://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