Ángel
@angel@triptico.com
Location: 40.4235492,-3.6617828
101 following, 152 followers
valgrind, libleak or the scan-build tool from the LLVM compiler. There is a less known tool inside the GCC compiler itself: the -fsanitize=address.If you use a standard make setup, you can recompile your project doing
make CFLAGS="-fsanitize=address -fno-omit-frame-pointer"After exiting your program, a summary of memory leak errors (including the line of the source code were it happened) will be printed out.