title: Boost Interprocess managed_shared_memory size parameter value?
body: <p>I'm using Boost Interprocess to map a vector in shared memory.</p>
  <p>This is the code I have from Boost tutorials:</p>
  <pre><code>using namespace boost::interprocess;
  using ShmemAllocator = allocator&lt;int, managed_shared_memory::segment_manager&gt;;
  using MyVector = boost::interprocess::vector&lt;int, ShmemAllocator&gt; MyVector;
  
  //                                                    question refers to this size
  //                                                                V
  managed_shared_memory segment(open_or_create, &quot;MySharedMemory&quot;, 65536); 
  
  const ShmemAllocator alloc_inst (segment.get_segment_manager());
  
  MyVector *myvector = segment.construct&lt;MyVector&gt;(&quot;MyVector&quot;)(alloc_inst);
  myvector-&gt;resize(SIZE);
  </code></pre>
  <p>I resize my vector after creating the <code>managed_shared_memory</code>.</p>
  <p>However, what happens if the <code>managed_shared_memory</code> size argument is smaller than the vector memory allocation?</p>
  <p>Rewording the question: how do I choose a size for the <code>managed_shared_memory</code>?</p>