I’m noticing a memory leak on OS X that I don’t see on Linux running the same code. I have a list of trees in an std::vector (these correspond to systematic variations) and call TTree::Fill() on each of them.
In a test where I have no systematics and only the nominal tree, I see a leak that is not big but still enough. Since the leak is report as 31.50 kb, I suspect that it has to do with the way the baskets are treated.
Attached is the relevant snippet of the output of Apple’s Instruments, which I attached to a running process on several thousands of events. Has anyone observed this before? The usage as reported by top or ps also clearly increases over time. The output on disk is 48MB so I clearly need the baskets to be flushed every once in a while. The function RegionTreeList::fill() simply is a loop over all the attached trees that calls tree->Fill() for each of them.
On Linux, valgrind reports no such issues. The branches of the tree I am writing out are either vectors of floats, or plain floats. No special types are written to the tree.