Valgrind is super useful for debugging native programs. Valgrind can be used to uncover memory leaks, concurrency issues and a lot more.

How valgrind works


  • Checking for memory leaks of a program (hello),

    valgrind --leak-check=full ./hello

    If you see a message like, All heap blocks were freed -- no leaks are possible, then your program is probably leak free!

Last updated