JeffersonLab / hcana

Hall C++ Analyzer
7 stars 118 forks source link

Correct various issues reported by valgrind #429

Closed hansenjo closed 5 years ago

hansenjo commented 5 years ago

valgrind revealed a large number of memory leaks, including a particularly nasty leak in the shower code that caused several hundred bytes to be lost per event.

This pull request patches all the hcana-related leaks reported when running UTIL_KAONLT/scripts_Replay/replay_production_coin.C(4914,10000).

Additionally, it patches some of several invalid memory access issues. The issues not yet fixed have been reported in #427 and #428.

hansenjo commented 5 years ago

Added another commit that fixes an ever-growing array problem in the hodoscope code.

The hcana memory usage is now practically constant over the course of several million events, as it should be: about 600 MB virtual, 250 MB resident on Linux with the Kaon LT production replay mentioned before. One sees one step of about 30-40 MB after about 100k events when ROOT "optimizes" the tree baskets, and that's it.

sawjlab commented 5 years ago

Squashed the "Forgotten " commit into the valgrind commit and merged into develop.

sawjlab commented 5 years ago

Also updated to lastest podd.