title: Is boost::managed_shared_memory using a file on my hard drive?
body: <p>When I create a new <code>boost::interprocess::managed_shared_memory</code>, I can see a file appear in <code>C:\ProgramData\boost_interprocess\1571641094\NAME_OF_SHARED_MEMORY</code> which size seems to match that of the shared memory created.</p>
  
  <p>My understanding from the <a href="https://www.boost.org/doc/libs/1_55_0/doc/html/interprocess/managed_memory_segments.html" rel="nofollow noreferrer">documention</a> is that there are two widely used objects usable to share memory between processes (within  <code>managed_shared_memory</code>'s scope):</p>
  
  <ul>
  <li><strong>basic_managed_shared_memory</strong></li>
  <li><strong>basic_managed_mapped_file</strong></li>
  </ul>
  
  <p>The <code>managed_shared_memory</code> uses the <code>basic_managed_shared_memory</code> implementation. I assumed this implementation is proper <em>shared <strong>memory</strong></em> and not a <em>memory mapped <strong>file</strong></em>.</p>
  
  <p>Seeing that it uses a file puzzles me. Are both of these managed shared memory based on a memory mapped file implementation ?</p>
  
  <p>Is the only boost shared memory solution on Windows that avoids memory mapped files the <code>windows_shared_memory</code> ?</p>
  
  <p>NB : I am on Windows 10, using VC++ on VS2013.</p>
  
  <p>Code sample that can reproduce the behaviour of creating a file in <code>ProgramData</code> when using a <code>managed_shared_memory</code> :</p>
  
  <pre><code>#include &lt;boost/interprocess/managed_shared_memory.hpp&gt;
  
  int main(int argc, char *argv[])
  {
    boost::interprocess::permissions permissions;
    permissions.set_unrestricted();
  
    boost::interprocess::managed_shared_memory* sharedMemory;
    sharedMemory = new boost::interprocess::managed_shared_memory(
    {
      boost::interprocess::open_or_create,
      "NAME_OF_SHARED_MEMORY",
      400000,
      0,
      permissions
    }
    );
  
    return 0;
  }
  </code></pre>