I have a question out of curiosity related to checking for memory leaks.
Being the one who often used valgrindto check for memory leaks in my code in the last year or two, I suddenly thought that it only detects lost / loose memory after the program’s life.
So, in the light of this, I thought that if you have a long program that malloc()intermittently and not free()until the application exits, then the potential for eating memory (not necessarily through leaks) is huge and is not observed using these tools because they only check the lifetime of the program. Are there any similar GDB tools that can stop the application during operation and check for the presence of memory, which the instance does not refer to in the life of the application?
Doddy source
share