[petsc-dev] valgrind appears to show memory leak related to PetscViewerBinaryOpen

Brad Aagaard baagaard at usgs.gov
Wed Jun 1 11:05:49 CDT 2011


Hi all:

Valgrind is suggesting that I may have a memory leak associated with 
PetscViewer objects in PyLith. I created a simple example (attached) 
that reproduces the valgrind message.

Is there really a memory leak associated with PetscMallocAlign() or is 
valgrind just confused?

I also ran the example with the -malloc -malloc_debug -malloc_dump 
flags. What do the values in square brackets mean? Does [0] indicate 
memory was freed or not freed? The FAQ on use of -malloc doesn't appear 
to discuss what the output means.

Logs from running the example in valgrind and with the malloc flags are 
also attached.

Thanks,
Brad
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: log_malloc
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110601/4576be45/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: log_valgrind
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110601/4576be45/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_viewer.cc
Type: text/x-c++src
Size: 610 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110601/4576be45/attachment.bin>


More information about the petsc-dev mailing list