[prev] 54 [next]

valgrind

valgrind is a tool that can
  • Find memory leaks (memory you malloced but did not free)
  • Find memory errors (bugs where you illegally tried to access memory)
Program must be compiled using -g option.

Can be run like:

$ valgrind ./a.out 

Or for more information about memory leaks:

$ valgrind --leak-check=full ./a.out