title: C malloc : inexplicable memory usage
body: <p>When I compile and run the following code :(using gcc on cygwin) </p>
  
  <pre><code>int *a = malloc(1024*1024*100*sizeof(int));
  while(1)
  ;
  </code></pre>
  
  <p>The task manager in Windows XP shows
  memory usage by this process as 2232K,
  which according to me should have been around 400000K.</p>
  
  <p>When I compile and run the following code :(using gcc on cygwin) </p>
  
  <pre><code>int *a = malloc(1024*1024*400*sizeof(int));
  while(1)
  ;
  </code></pre>
  
  <p>the memory usage goes down to 1388K;</p>
  
  <p>So, rather than showing an increase, it actually
  shows a decline.</p>
  
  <p>What could explain this?</p>