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@lists.boost.org> 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@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users