Last active
December 15, 2015 21:39
-
-
Save amuraru/5327711 to your computer and use it in GitHub Desktop.
valgrid check-memory leaks infinite loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <valgrind/memcheck.h> | |
... | |
while(1) { | |
VALGRIND_DO_LEAK_CHECK; | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% valgrind --tool=memcheck --leak-check=full --show-reachable=yes --suppressions=test/valgrind.supp --dsymutil=yes ./prog 2>&1 | grep -A6 LEAK | |
% valgrind -v --tool=memcheck --leak-check=full --show-reachable=yes --suppressions=test/valgrind.supp --dsymutil=yes ./prog 2>&1 | grep -A10 'definitely lost' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment