Re: [ROOT] Memory usage and TTree::Fill()

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Sep 12 2000 - 16:24:22 MEST


Hi Denis,
This is the expected behaviour with TTree::Fill.
You should observe a slight increase in memory when you keep adding entries
to the Tree. The system has to allocate/reallocate internal tables.
At the first call to TTree::Fill, branch buffers (baskets) will also be
allocated (explaining your jump from 9584 to 11332 K)

The frequency at which the internal tables must be reallocated depend
on the branch buffer size. I can tell you more if you send me the result of
tree.Print() at the end of your program. You can see there the total number of
buffers (baskets) written for each branch.

Rene Brun

 branch buffer size.

denis bertini wrote:
> 
> Hi all,
> 
> We have noticed that our ROOT based processes were
> always slowly growing in memory.
> 
> This leakage disappears when the TTree::Fill() function of our
> data structures (based on TTree ) is switched off.
> 
> I made a test ( outside our framework) using the ROOT
> tutorial example. I just used MainEvent.cxx and looked at the
> size of the Event process.
> 
> Results:
>                1) Commenting the TTree::Fill()
>                      Event process size is constant  :  9584 kBytes
> 
>                2) Using TTree::Fill()
> 
>                            Nevents                   Event process Size (kBytes)
> 
>                             1000                        11332  k
>                             5000                        11584  k
>                            10000                       11812  k
>                             ....
> 
> 
> The setup :
>                Os:  Linux Pc  running Debian 2.1
> 
>                ROOT:
>                         - Root 225-02
>                         - in .rootrc :   Root.ObjectStat : 0
>                         - i used libNew.so
> 
> 
>  Is there somthing that we have to be aware of when using TTree::Fill()
> command ?
>                                                                   Denis Bertini
>                                                                   KP1-GSI-Darmstadt
> 
>



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET