title: Enable memleak option in gdb for linux
body: <p>I am trying to see which process which is causing a memory leak, and dump the heap which is causing it to see what is the issue.</p>
  
  <p>Which command do I use in gdb to set the memory leak on and check the heap?</p>
  
  <p>I tried:</p>
  
  <pre><code>(gdb) check -leaks
  
  checkpoint: can't find fork function in inferior.
  
  (gdb) help info heap
  
  Undefined info command: "heap".  Try "help info".
  
  (gdb) help info leaks 
  
  Undefined info command: "leaks".  Try "help info".
  </code></pre>