Memory leak in ContainerFragmentLoader
ContainerFragmentLoader was calling ContainerFragment::create_index_, then putting the generated index into the Fragment. However, it never deleted the array allocated by create_index_, causing BoardReaders that use ContainerFragment to leak memory at a rate proportional to the number of Fragments in the Containers.
This bug was discovered during testing of the circular_buffer_mode_example with component03's usecs_between_sends set to 1000.
Fix is on artdaq-core/bugfix/ContainerFragmentLoader_MemoryLeak
#4 Updated by Kurt Biery about 2 months ago
In tests at protoDUNE, I saw the memory usage of the Trigger BoardReader increase to 3% of memory after 5 minutes and 5.5% after 10 minutes (with 1200 fragments per Container) without this code change. With this code change, it was 0.5% after 5 minutes, 0.7% after 10 min, and 1.2% after 20 min.
On mu2edaq01 with the circular_buffer_mode_example (and nADCcounts set to 200), the memory increased to 20% after 5 minutes into a run without this code change. (and 30% after 8 minutes) With this code change, the BoardReader memory usage for component03 was 4.4% after 5 minutes and 6.4% after 8 minutes.
This fix clearly helps, so I will merge the associated branch to develop, but it seems like there still is some sort of memory issue. I will file a separate Redmine Issue for that.