Closed danielealbano closed 1 year ago
Patch coverage: 46.94
% and project coverage change: -0.38
:warning:
Comparison is base (
ec3b624
) 77.04% compared to head (8491ece
) 76.66%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This PR improves the memory allocation / freeing tracking in FFMA and add its support to the release mode.
The implementation is fairly simple, it doesn't store entire entire stack trace but just a pointer to the function name and the line number adding a total of 12 bytes to each ffma_slot_t entry.
The tracking is done leveraging FUNCTION and LINE using some defines to wrap the underlying invocations.
At the end cachegrand's execution now if there are memory leaks these are printed out.
Also FFMA is not freed anymore as it doesn't make sense to free it, it's the memory allocator and keeping around the basic data structure allows better tracking of the memory leaks and avoid issues with threads trying to write to freed FFMA instances (which is bad :)).
This new feature has allowed to discover some memory leaks that are going to be fixed with ad-hoc PRs.