
sankar lingam wrote:
I made the following wrapper over the Boost.InterProcess Allocator,
[...]
and used the shared_allocator as the allocator to Boost.multi_array and
I find it working fine. The boost multi_array allocates and deallocates the memory
through shared_allocator.
Am I doing something wrong here??Can it be used this way??
MultiArray will store a raw pointer as a member. This means that if two processes map the shared memory in different addresses, the process that didn't create the MultiArray will crash. This can only work if all processes exactly map the shared memory in the same address. MultiArray adaptation would require using allocator::pointer instead of raw pointers as member pointers. In case you find it useful, latest (SVN) Boost.Multiindex is compatible with Boost.Interprocess. Regards, Ion