title: How can i estimate memory usage of std::map?
body: <p>For example, I have a std::map with known sizeof(A) and sizeof(B), while map has N entries inside. How would you estimate its memory usage?
  I'd say it's something like</p>
  
  <pre><code>(sizeof(A) + sizeof(B)) * N * factor
  </code></pre>
  
  <p>But what is the factor? Different formula maybe?</p>
  
  <p>Maybe it's easier to ask for upper bound?</p>