title: Weird behaviour when inserting too many items to std::map or std::unordered_map
body: <p>I am working on point clouds and i use <code>std::map&lt;int, std::vector&lt;int&gt;&gt;</code> for down sampling the cloud. Keys in the map holds spatial index and vector holds ids of points. From this map i extract some points to process and that processing is done using multithreading(not the part with the map). At this point map is already out of scope. However, When my cloud is too big and downsampling ratio is too low i get a really strange behavior. Even though i use all my logical threads my cpu usage goes down to 60-70%. When i do the down sampling without the map(by simply skipping points) i don't get this issue. I checked that all the threads are running and my application has no mutexes they only read from the cloud which is a <code>vtkUnstructuredGrid</code> and thread safe for read only operation. I don't see why something like this would happen.</p>
  
  <p>Could this issue be happening because of <code>map::max_size()</code> because when i decrease the size of the map i dont have any issue. Also why would it cause issue in my multithreaded part? My question would be does inserting elements to map more than <code>max_size</code> cause some sort of undefined behavior? Thanks in advance.</p>