memory loggin

Barry Smith bsmith at mcs.anl.gov
Fri Jul 6 16:56:04 CDT 2007


  Great.

  If you make PetscNewLog() support also the null object, then
maybe eventually we'll only have PetscNewLog() and PetscMallocLog() etc
and then we can remove the Log() from the name. This would
be best.

   Thanks for tackling this.

   Barry


On Fri, 6 Jul 2007, Lisandro Dalcin wrote:

> 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.
> 
> Regards
> 
> 




More information about the petsc-dev mailing list