Closed hkiel closed 2 years ago
abcm2ps is a command line program, not a daemon. It does not need to free the memory it used at exit time.
Yes, it allocates memory in the heap. The allocator (arena) has 3 pools (levels): global, tunes and generation. Memory is allocated as needed, and when either the generation or the tunes (ABC file) are done, the arenas are put in an internal pool of free memory.
Your test generates only one file, then the memory arenas allocated for scanning the tunes are internally freed. But the generation level contains only the memory used by the last generation.
So, every thing is normal.
I instrumented
abcm2ps
with memory allocation tracking module and found a few 'leaks' when running./abcm2ps sample.abc
I guess there should be more places in the code when using other input files and/or parameter flags. This was just to test the infrastructure. I could not find any memory violations yet (allocated memory is 'protected' by a 16 byte wall at both ends, which is checked at
free()
and end of program)