title: Shared map with boost::interprocess
body: <p>I have a simple requirement that might be tough to solve. I did find some leads like <a href="https://stackoverflow.com/questions/8503834/boost-interprocess-map-with-int-and-string">this</a> or <a href="https://stackoverflow.com/questions/11842082/map-in-shared-memory">this</a> 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.</p>
  
  <p>I have also come across <a href="http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Interprocess_STL_Map" rel="nofollow noreferrer">Interprocess STL Map</a> but I have not yet been able to assemble it into working code.</p>
  
  <p>I am thinking <code>boost::interprocess</code> is the way to go here, unless I want to create some shared memory map from scratch.</p>
  
  <p>I am not concerned with portability. I need a solution that will work with MS compiler, specifically the one that comes with VS 2010.</p>
  
  <p><a href="https://stackoverflow.com/questions/8503834/boost-interprocess-map-with-int-and-string">This poster</a> 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.</p>
  
  <p>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?</p>
  
  <p>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.</p>
  
  <p>Any help is highly appreciated.</p>