
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