Memory leaks??

Billy Araújo billy at
Sun Oct 25 10:04:52 CDT 2009

I ran my application with PETSc and verified that memory consumption increased over time. I am not sure what is happening.

Running my application with valgrind I get several leaks such as:

==25943== 16 bytes in 1 blocks are indirectly lost in loss record 9 of 11
==25943==    at 0x4024C1C: malloc (vg_replace_malloc.c:195)
==25943==    by 0x4380C60: tsearch (tsearch.c:281)
==25943==    by 0x4393D2D: __nss_lookup_function (nsswitch.c:342)
==25943==    by 0x4831F25: ???
==25943==    by 0x4832B5C: ???
==25943==    by 0x434CCE4: getpwuid_r@@GLIBC_2.1.2 (getXXbyYY_r.c:253)
==25943==    by 0x434C64E: getpwuid (getXXbyYY.c:117)
==25943==    by 0x85DF39E: PetscGetUserName (fuser.c:68)
==25943==    by 0x859E6D9: PetscErrorPrintfInitialize (errtrace.c:68)
==25943==    by 0x85D0F78: PetscInitialize (pinit.c:521)
==25943==    by 0x8050E37: main (main.c:516)

In main.c:516, I just have:

  PetscInitialize (&argc, &argv, (char *) 0, help);

 which I thing is the normal way of calling PetscInitialize.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list