[interprocess] Container

Hi, is there a possibility to put something like this into the shared_memory? class A { int a; double d; // ... boost::interprocess string s; } Thanks in advance.

AMDG Moritz wrote:
is there a possibility to put something like this into the shared_memory?
class A { int a; double d; // ... boost::interprocess string s; }
Thanks in advance.
Yes. You need to use an appropriate allocator, but other than that, it should be fine. In Christ, Steven Watanabe

is there a possibility to put something like this into the shared_memory?
class A { int a; double d; // ... boost::interprocess string s; }
I need to save classes in the managed_shared_memory that contain strings
and vectors and all that stuff.
So the general way to put a string into the shared_mem is like this:
typedef boost::interprocess::allocator

I tried a lot of things and it all comes down to the question below.
First I'll give an overview about what I want to do.
First some typedefs and then the class that should be written to the
shared_memory:
typedef boost::interprocess::managed_shared_memory::segment_manager
segment_manager_t;
typedef boost::interprocess::allocator
participants (2)
-
Moritz
-
Steven Watanabe