title: C/C++ - Why is the heap so big when I'm allocating space for a single int?
body: <p>I'm currently using gdb to see the effects of low level code. Right now I'm doing the following:</p>
  
  <pre><code>int* pointer = (int*)calloc(1, sizeof(int));
  </code></pre>
  
  <p>yet when I examine the memory using <code>info proc mappings</code> in gdb, I see the following after what I presume is the .text section (since Objfile shows the name of the binary I'm debugging):</p>
  
  <pre><code>...
  Start Addr    End Addr    Size     Offset    Objfile
  0x602000      0x623000    0x21000  0x0       [heap]
  </code></pre>
  
  <p>How come the heap is that big when all I did was allocating space for a single int?</p>
  
  <p>The weirdest thing is, even when I'm doing <code>calloc(1000, sizeof(int))</code> the size of the heap remains the same.</p>
  
  <p>PS: I'm running Ubuntu 14.04 on an x86_64 machine. I'm compiling the source using g++ (yes, I know I shouldn't use calloc in C++, this is just a test).</p>