I am developing an extension module for Guile written in C. This extension module includes a Python interpreter.
Since this extension module calls the Python interpreter, I need to make sure that it correctly manages the memory occupied by Python objects.
I found that the Python interpreter behaves well in its own memory handling, so by running valgrind I can find memory leaks due to errors in my own Python interpreter injection code if there are no other interfering factors.
However, when I run Guile under valgrind, valgrind reports memory leaks. Such memory leaks hide any memory leaks due to my own code.
The question is what can I do to separate memory leaks due to errors in my code from memory leaks reported by valgrind due to Guile. Another tool instead of valgrind? Special valgrind options? Stop using manual code?
source share