[petsc-dev] writing PETSc code with no memory leaks

Lisandro Dalcin dalcinl at gmail.com
Tue May 10 15:50:33 CDT 2011


On 10 May 2011 05:27, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>   I find it very useful when writing PETSc code to keep the environmental variable
>
> export PETSC_OPTIONS="-malloc -malloc_debug -malloc_dump"
>
> where I run my test programs. This helps me see memory leaks immediately (where I forgot to destroy some objects or free some memory) rather than tracking down a ton of memory leaks months later. Suggest others do the same.
>

Is this used when you "make testexamples" ?


-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169



More information about the petsc-dev mailing list