title: Large initial memory footprint for native app
body: <p>I've noticed that the native C++ application I'm working on has quite a large memory footprint (20MB) even before it enters any of my code. </p>
  
  <p>(I'm referring to the "private bytes" measure in Windows, which as I understand it is the most useful metric).</p>
  
  <p>I've placed a break point on the first line of the "main()" function and sure enough, the footprint is at 20MB when it reaches that. </p>
  
  <p>The size of the EXE is only a couple of meg so that doesn't account for it.</p>
  
  <p>I also deliberately removed all of the DLLs just to prove they weren't the cause. As expected it gets a "Dll not found" message, but the footprint is still 20MB!</p>
  
  <p>So then I wondered that maybe it was the statically initialised objects which were the cause.</p>
  
  <p>So, I added breakpoints to both "new" and "malloc". At the first hit to those (for the first static initialiser), the memory is already 20MB.</p>
  
  <p>Anyone got any ideas about how I can diagnose what's eating up this memory?</p>
  
  <p>Because it seems to be memory outside of the usual new/malloc paradigm, I'm struggling to understand how to debug.</p>
  
  <p>Cheers,</p>
  
  <p>John</p>