GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Out of memory problem in EmcPoint - FairLink ?
Re: Out of memory problem in EmcPoint - FairLink ? [message #11161 is a reply to message #10897] Wed, 03 November 2010 13:45 Go to previous messageGo to previous message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Hi all,

Following the discussion started by Tobias today on EVO meeting concerning memory allocation by TClonesArray I want to propose an idea to use TClonesArray::Compress() (which remove empty slots) if TClonesArray::Capacity() (i.e. number of allocated slots) is above certain threshold, and this threshold can be subsystem and data level dependent. The threshold can be needed not to loose the performance by frequent TClonesArray compression.

I.e. for example it could look like in PndEmcMakeCluster::Exec()
fClusterArray->Delete();
if (fClusterArray->Capacity()>100)
fClusterArray->Compress();


However in case of EMC FairLinks created most problems at the simulation stage and here I do not know precisely where to compress TClonesArray.

In PndEmc there is a method Reset() and I can guess it clear the memory at each event, but I am not 100% sure.

void PndEmc::Reset() {
   fEmcCollection->Clear();
   fPosIndex = 0;
}


So it could be modified like
void PndEmc::Reset() {
   fEmcCollection->Clear();
   if (fEmcCollection->Capacity()>100)
   fEmcCollection->Compress();
   fPosIndex = 0;
}

Here I put for check of capacity 100 as an arbitrary number which should be optimized.

I have complication to check it by myself since search for memory leaks requires rather powerful computer and mine is not.

May be this will not help to solve the problem with FairLink but it can be checked.

Dima
 
Read Message icon8.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon4.gif
Read Message
Read Message
Read Message
Read Message
Read Message icon7.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Compilation problem of trunk
Next Topic: Error during PndTpcElectronicsTask
Goto Forum:
  


Current Time: Tue Oct 04 15:36:59 CEST 2022

Total time taken to generate the page: 0.01002 seconds