<div class="gmail_quote">On Thu, Aug 30, 2012 at 6:18 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It is easy to simply using -malloc -malloc_debug -malloc_dump to see all the memory that was allocated and not freed.</blockquote></div><br><div>With petsc-3.3 and later, just export PETSC_OPTIONS=-malloc_test. It does the same as above in debug mode, but turns it off for optimized builds so you can just export it in your environment and forget about it.</div>