title: c++ stl map storage and memory usage
body: <p>I understood that when inserting new entry, stl map will copy construct and store value instead of pointer or reference. </p>
  
  <p>However, I am confused by the following sample code:</p>
  
  <pre><code>int main( int argc, char** argv ){
      map&lt;int, vector&lt;int&gt; &gt; m;
      for(int i=0;i&lt;10; i++){
          m[i] = vector&lt;int&gt;();
      }
      cout&lt;&lt;sizeof(m)&lt;&lt;endl;
      cout&lt;&lt;m[1].size()&lt;&lt;endl;
      for(map&lt;int, vector&lt;int&gt; &gt;::iterator it=m.begin(); it!=m.end(); it++){
          it-&gt;second.push_back(1);
          it-&gt;second.push_back(1);
          it-&gt;second.push_back(1);
      }
      cout&lt;&lt;sizeof(m)&lt;&lt;endl;
      cout&lt;&lt;m[1].size()&lt;&lt;endl
  }
  </code></pre>
  
  <p>The outputs are</p>
  
  <pre><code>48
  0 
  48  
  3
  </code></pre>
  
  <p>Why the size of the map is unchanged even though I am changing the values of the map?</p>