I have a simple requirement that might be tough to solve. I did find some leads like this or this but I can't seem to readilly use them. The former doesn't even translate into buildable code for me. I am not experienced with Boost to just write this on my own but it seems to me this might be a common requirement.
I have also come across Interprocess STL Map but I have not yet been able to assemble it into working code.
I am thinking boost::interprocess is the way to go here, unless I want to create some shared memory map from scratch.
I am not concerned with portability. I need a solution that will work with MS compiler, specifically the one that comes with VS 2010.
This poster seems to want to more or less what I am trying to do, except I need to map a GUID to an arbitrary length binary buffer (but an int to string is equally good as a starting point). Unfortunately, I cannot compile the code cleanly to even begin with experiments.
Also I have two concerns: A) is it possible to automatically (or at least predictably) grow/shrink the shared memory to accommodate allocation needs and B) assuming one process creates the map, how can another process "attach" to it?
I don't mind if a solution requires multiple shared "segments" in order to satisfy allocation needs. It doesn't necessarily have to be a single monolithic shared chunk of memory.
Any help is highly appreciated.