|
Boost Users : |
Subject: Re: [Boost-users] [Interprocess] shared_ptr in shared memory and inheritance
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-02-12 16:42:18
Gaetan Gaumer wrote:
>
> First of all, if you use fixed_managed_shared_memory, you want to
> specify the same base address in ever process, otherwise, you're
> code won't work.
>
>
> Is it enough to create the segment with the same name in each process :
> eg a call to the line below in each process :
> fixed_managed_shared_memory
> segment(open_or_create,"sharedPtrSharedMemoryTest", 2048);
You don't have any guarantee that the OS will map it in the same address
in both processes.
> I understand your solution but I don't know wich method I have to redefine.
> Because the problem is not really the destructor, but rather the "deleter".
> And I don't find how to redefine (and register) the base deleter to call
> the derived one.
>
> Could you help me (again...)
Sorry, it was just a fast idea that I haven't elaborated. But I guess
this will be hard to implement. Inheritance and shared memory don't work
very well
> Regards,
> Gaëtan
Regards,
Ion
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