<div dir="ltr">unless you&#39;re on an OS X machine, in which case you should use libgmalloc: <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/libgmalloc.3.html">http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/libgmalloc.3.html</a><br>
<br>~A<br><br><div class="gmail_quote">On Wed, Jul 23, 2008 at 2:25 PM, Barry Smith &lt;<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
 &nbsp;To emphasis Satish&#39;s point you should definitely use <a href="http://www.valgrind.org" target="_blank">www.valgrind.org</a> to remove<br>
all the memory bugs before starting to use it with PETSc.<br>
<br>
 &nbsp;valgrind is the closest thing to a magic bullet I have ever seen in computing.<br><font color="#888888">
<br>
 &nbsp; Barry</font><div><div></div><div class="Wj3C7c"><br>
<br>
<br>
On Jul 23, 2008, at 1:04 PM, Satish Balay wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 23 Jul 2008, Paul T. Bauman wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
Quick (and probably stupid) question: Does CHKMEMQ check *all* of memory used<br>
by the program for corruption or just the memory PETSc allocated? I have a<br>
code that I&#39;m assigned to work on that doesn&#39;t use PETSc (yet), but I was<br>
hoping to use this macro to track down what I think is a memory corruption<br>
bug.<br>
</blockquote>
<br>
CHKMEMQ checks memory allocated by PetscMalloc() - for<br>
out-of-bounds-write errors.<br>
<br>
Valgrind is a general tool for detecting many more types of memory<br>
corruption.<br>
<br>
Satish<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>