Boost logo

Boost Users :

Subject: [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-20 12:03:36


Hi everyone !
How to keep a pointer on a shared data in a boost shared memory segment ? I
have a function which returns
shm.construct<SharedData>(_nameSeg.c_str())(innerDataAllocator); But
outside of the function, the object pointed by SharedData is inaccessible
My general problem is that I want to have way to get, and set data in
shared memory, but without, each time, having to :
-get shm
-find object in shm based on its name
-construct allocators.
So I would like to store 1) allocators and 2)a pointer to the shared object
How could I do this ?
I made a SO question about my problem, can you have a look ? It should be
clearer :)
https://stackoverflow.com/questions/55195149/how-to-keep-a-pointer-on-a-shared-data-in-a-boost-shared-memory-segment



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