memory loggin

Lisandro Dalcin dalcinl at
Fri Jul 6 16:51:07 CDT 2007

I am going to push some changes related to memory loggin.

In short:

* PetscHeaderCreate now logs the mem it allocates.

* A new macro PetscNewLog(obj, type, ptr) was added. This should be
used, for example, for allocating internal structures of various
subtypes. Of course, I've already made all the changes in the rest of
the code and tested ir exaustively with some python scripts, so I
believe all its right.

Currently, 'PetscNewLog' macro dereferences the  PetscObject 'obj'
pointer (actually, PetscLogObjectMemory do this). This can be changed
to accept a NULL (I am inclined to this).  Finally, perhaps a better
name can be found. Any suggestion?

The next step would be to do something similar for PetscMalloc. Barry
want to take into accout temporarily allocated mem. But as a start, I
will try first to do the proper loggin for 'permanent' memory.


Lisandro Dalcín
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594

More information about the petsc-dev mailing list