title: Size of memory allocated by new[]
body: <p>I'm investigating a crash, and I have the stack trace below</p>
  
  <pre><code>...
  12 4292e2c4 73148e89 KERNELBASE!RaiseException+0x58
  13 4292e2fc 73150e7c MSVCR80!_CxxThrowException+0x46 [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\throw.cpp @ 161]
  14 4292e318 386f21ba MSVCR80!operator new+0x69 [f:\dd\vctools\crt_bld\self_x86\crt\src\new.cpp @ 63]
  15 4292e32c 386f1f39 StatEngineProxy!std::allocator&lt;myClass&gt;::allocate+0x1a [c:\program files (x86)\microsoft visual studio 8\vc\include\xmemory @ 146]
  16 4292e384 386ef7e8 myModule!std::vector&lt;myClass,std::allocator&lt;myClass&gt; &gt;::_Insert_n+0xf9 [c:\program files (x86)\microsoft visual studio 8\vc\include\vector @ 1138]
  17 4292e3b0 386ec20f myModule!std::vector&lt;myClass,std::allocator&lt;myClass&gt; &gt;::insert+0x88 [c:\program files (x86)\microsoft visual studio 8\vc\include\vector @ 855]
  18 4292e3dc 3872bb17 myModule!std::vector&lt;myClass,std::allocator&lt;myClass&gt; &gt;::push_back+0xaf [c:\program files (x86)\microsoft visual studio 8\vc\include\vector @ 800]
  ....
  </code></pre>
  
  <p>cause is simple: <code>bad_alloc</code>. The question is how can I find how much memory stl was trying to alloc.</p>