CHKMEMQ
Barry Smith
bsmith at mcs.anl.gov
Wed Jul 23 13:37:35 CDT 2008
Sadly libgmalloc doesn't hold a candle to valgrind. Apparently
valgrind for the
Mac is in the works.
Barry
If you have the choice between using libgmalloc on your mac, or
rebuilding the code on linux
and then using valgrind I'd go with valgrind any day.
On Jul 23, 2008, at 1:35 PM, Aron Ahmadia wrote:
> unless you're on an OS X machine, in which case you should use
> libgmalloc: http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/libgmalloc.3.html
>
> ~A
>
> On Wed, Jul 23, 2008 at 2:25 PM, Barry Smith <bsmith at mcs.anl.gov>
> wrote:
>
> To emphasis Satish's point you should definitely use
> www.valgrind.org to remove
> all the memory bugs before starting to use it with PETSc.
>
> valgrind is the closest thing to a magic bullet I have ever seen in
> computing.
>
> Barry
>
>
>
> On Jul 23, 2008, at 1:04 PM, Satish Balay wrote:
>
> On Wed, 23 Jul 2008, Paul T. Bauman wrote:
>
> Hello,
>
> Quick (and probably stupid) question: Does CHKMEMQ check *all* of
> memory used
> by the program for corruption or just the memory PETSc allocated? I
> have a
> code that I'm assigned to work on that doesn't use PETSc (yet), but
> I was
> hoping to use this macro to track down what I think is a memory
> corruption
> bug.
>
> CHKMEMQ checks memory allocated by PetscMalloc() - for
> out-of-bounds-write errors.
>
> Valgrind is a general tool for detecting many more types of memory
> corruption.
>
> Satish
>
>
>
More information about the petsc-users
mailing list