Skip to content

Instantly share code, notes, and snippets.

@jmftrindade
Created April 17, 2019 22:03
Show Gist options
  • Save jmftrindade/670b3006dee9294953ea2f57a9ba4a77 to your computer and use it in GitHub Desktop.
Save jmftrindade/670b3006dee9294953ea2f57a9ba4a77 to your computer and use it in GitHub Desktop.
valgrind

Debug flags for binary

CXX -gdwarf -ggdb3 -O0 -o <YOUR_BINARY> ...

Valgrind command

$ valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=/tmp/valgrind.txt <YOUR_BINARY>

Then look for heap report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment