Re: Finding out, how much memory all TObjects consume

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Tue, 17 Jul 2007 11:31:46 +0200


Hi Hans,

you could use massif (a valgrind tool), or enable the TObject statistics in .rootrc (Root.ObjectStat) and then call gObjectTable->Print() whenever you want to see the current allocation statistics. Check http://root.cern.ch/root/html/TObjectTable.html

Cheers, Axel.

Hans Dembinski wrote:
> Dear Root users/developers,
>
> I have a Root program which consumes too much memory after some runtime. I am
> trying to solve this, maybe someone can give me a pointer?
>
> 1) I checked my program with valgrind, there's no memory leaking. The memory
> has to be in some container.
>
> 2) Memory consumption by TFile?
> I know already, that the memory is related to section of the code, which loads
> repeadedly and randomly big Histograms from a ROOT-File (of 135 MB size). I
> now do delete the Histograms after use, but the memory still grows the same.
> Maybe it is some TFile buffer, which grows so much?
>
> 3) Is there a possibility to get at random points in the program an overview
> about how much memory each TObject uses and what its name is? I tried to
> gROOT->GetListOfClasses() but so far, I'd not got it right.
>
> Best regards and thank you for reading,
> Hans
>
Received on Tue Jul 17 2007 - 11:31:49 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 17 2007 - 17:50:02 CEST