title: What is the purpose and usage of `memory_resource`?
body: <p>The standard <code>C++17</code> include a new namespace <code>pmr</code> including a set of classes grouped under the name of <code>memory_resource</code>.</p>
  
  <p>After a search on internet, I found very few vulgarized information about it, the direct consequence is this question:</p>
  
  <p><strong>What are the main ideas behind <code>pmr</code> and especially <code>pmr::memory_resource</code>?</strong></p>
  
  <hr>
  
  <p>Detailing a bit more the question, some of the question marks in my head are:</p>
  
  <ul>
  <li>What does it bring new, or what were the limitations it solve?</li>
  <li>What is the difference with <code>allocator</code>?</li>
  <li>Does polymorphic mean it is possible to select runtime the <code>allocator</code> provided to a container constructor? (e.g. for testing purpose)</li>
  <li>Does it helps for implementing memory pool, or other memory management schemes?</li>
  </ul>
  
  <hr>
  
  <p>Context:</p>
  
  <p>In the intend of creating a <code>memory pool</code> allocator, I found information about this namespace. Reading names like <code>pool_options</code> or <code>polymorphic_allocator</code> raised my attention.</p>
  
  <hr>
  
  <p>Related questions:</p>
  
  <p><a href="https://stackoverflow.com/questions/38010544/polymorphic-allocator-when-and-why-should-i-use-it">polymorphic_allocator: when and why should I use it?</a></p>