Running your program under Memcheck

If you normally run your program like this:
  myprog arg1 arg2

Use this command line:
  valgrind --leak-check=yes myprog arg1 arg2
 
Memcheck is the default tool. The --leak-check option turns on the detailed memory leak detector.

Your program will run much slower (eg. 20 to 30 times) than normal, and use a lot more memory.

Memcheck will issue messages about memory errors and leaks that it detects.