title: Valgrind heap summary understanding
body: <p>I am running a code and I encounter the error as </p>
  
  <blockquote>
    <p><strong>* glibc detected *</strong> /home/build/bin/../bin/OPENSUSE_12.2_X86_64/reader: corrupted
    double-linked list: 0x0000000003df6dc0 <em>*</em></p>
  </blockquote>
  
  <p>I tried to re-run it by valgrind to know whether if any memory leak is the problem. I run it as </p>
  
  <blockquote>
    <p>valgrind --leak-check=full -v ./myprog</p>
  </blockquote>
  
  <p>since the program does not complete and stops the valgrind summary is as below:</p>
  
  <blockquote>
  <pre><code>&gt;     ==5335== Process terminating with default action of signal 2 (SIGINT)
  &gt;     ==5335==    at 0x54E4007: kill (in /lib64/libc-2.15.so)
  &gt;     ==5335==    by 0x429473: ??? (in /bin/bash)
  &gt;     ==5335==    by 0x42A313: wait_for (in /bin/bash)
  &gt;     ==5335==    by 0x462BFE: execute_command_internal (in /bin/bash)
  &gt;     ==5335==    by 0x463360: execute_command (in /bin/bash)
  &gt;     ==5335==    by 0x41B7F0: reader_loop (in /bin/bash)
  &gt;     ==5335==    by 0x41B4C9: main (in /bin/bash)
  &gt;     ==5335== 
  &gt;     ==5335== HEAP SUMMARY:
  &gt;     ==5335==     in use at exit: 37,513 bytes in 1,074 blocks
  &gt;     ==5335==   total heap usage: 1,922 allocs, 848 frees, 72,605 bytes allocated
  &gt;     ==5335== 
  &gt;     ==5335== Searching for pointers to 1,074 not-freed blocks
  &gt;     ==5335== Checked 220,224 bytes
  &gt;     ==5335== 
  &gt;     ==5335== LEAK SUMMARY:
  &gt;     ==5335==    definitely lost: 0 bytes in 0 blocks
  &gt;     ==5335==    indirectly lost: 0 bytes in 0 blocks
  &gt;     ==5335==      possibly lost: 0 bytes in 0 blocks
  &gt;     ==5335==    still reachable: 37,513 bytes in 1,074 blocks
  &gt;     ==5335==         suppressed: 0 bytes in 0 blocks
  &gt;     ==5335== Reachable blocks (those to which a pointer was found) are not shown.
  &gt;     ==5335== To see them, rerun with: --leak-check=full --show-reachable=yes
  &gt;     ==5335== 
  &gt;     ==5335== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
  &gt;     --5335-- 
  &gt;     --5335-- used_suppression:      2 dl-hack3-cond-1
  &gt;     ==5335== 
  &gt;     ==5335== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
  </code></pre>
  </blockquote>
  
  <p>in the total heap usage: 1,922 allocs, 848 frees and I wonder if here might be any problem?
  but in error summary there is no error. I wonder if I should be concerned about any problem in the code or memory leak?</p>