valgrind[1] is an instrumentation framework for building dynamic analysis tools. Some Valgrind tools can automatically detect many memory management and threading bugs, and profile your programs in detail.

Valgrind is designed to be as non-intrusive as possible. It works directly with existing executables/applications. It does not require to recompile, relink, or otherwise modify the program to be checked.

Here is a simple way to invoke valgrind:

Board $> valgrind [valgrind-options] <Program> [Prog_Args]

valgrind can be started without [valgrind-options]. More options can be turned on afterward, according the proposals provided in valgrind first-pass result.

Analysis is done during all phase of the program execution: program start, program run and program stop.