Hello,
I have an application which receives histograms periodically and saves them to a file with different cycle numbers.
It opens a new file when started,
and it calls TObject->Write() for the histograms it receives.
and closes file on termination.
However if the program runs for a long time it consumes all the memory available and crashes.
There is no memory allocation which could cause a leak, and valgrind also doesn’t report a leak.
I believe I need to call TFile->Flush() or TFile->Write() at some point but I can’t do that whenever I receive a histogram since I may receive many histograms per second. So I thought of checking the current memory but couldn’t find how to do it. Searching through the forum didn’t help also.
Does anybody know how can I get current memory consumption of ROOT. Do I have to get it from the system or does ROOT have a method for it.
Thanks,
Sami