Valgrind is a suite of tools for debugging and profiling x86-Linux programs.
With the tools that come with Valgrind, you can automatically detect many
memory management and threading bugs, avoiding hours of frustrating
bug-hunting, making your programs more stable. You can also perform detailed
profiling, to speed up and reduce memory use of your programs.
The Valgrind distribution currently includes five tools: two memory error
detectors, a thread error detector, a cache profiler and a heap profiler.