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:
Or for more information about memory leaks:
$ valgrind --leak-check=full ./a.out
|
|