title: How to implement a custom allocator to be used with std::map?
body: <p>I'm looking for some pointers on how to implement a custom allocator to be used with a <code>std::map</code>. I'm interested on populating a map with millions of entries without having an allocation for each element in the container (which is the default for this container). The reason for this is to pass data to a third party library that is using a map to store samples of a chart (QCustomPlot) and I'm feeling the performance hit when plotting large time series. </p>
  
  <p>Is it possible to do this with one allocation if the size of the <code>std::map</code> is known in advance?</p>
  
  <p>EDIT:
  The nodes will be fed in ascending order into the container.</p>