It looks like this:
MyType * pMy = my_segment->construct<MyType>(anonymous_instance)();
my_segment->destroy_ptr(pMy);
Where MyType is some typical struct and my_segment is correctly constructed boost::interprocess::managed_shared_memory * is around 10 times slower than the equivalent:
MyType * pMy = new MyType();
delete pMy;
I did not expect this. I though the two allocation algorithms should be similar in implementation and performance. Is there some good reason for such a huge difference.
Edit: The test was conducted over a huge number of iterations.