I am currently looking at the documentation for Boost's interprocess library, and am trying to figure out what the difference is.
From all I can tell the only difference is the persistence (windows shared memory is released when the last process exits, managed_shm is released only when told so), are there other differences like speed or so that I am missing?
The difference is
managed_shared_memory
follows POSIX requirements, thus emulating the parts thatwindows_shared_memory
is missing (i.e. persistence). This is done via memory file mapping.The downsides of
managed_shared_memory
seems to be interopability with other applications (that use native windows shared memory) and potentially speed upon first access. The downside ofwindows_shared_memory
on the other hand is lack of portability between systems.