Valgrind is a framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new tools.
The Valgrind distribution currently includes six production-quality tools: a memory error detector, two thread error detectors, a cache and branch-prediction profiler, a call-graph generating cache abd branch-prediction profiler, and a heap profiler. It also includes three experimental tools: a heap/stack/global array overrun detector, a different kind of heap profiler, and a SimPoint basic block vector generator.
Valgrind is closely tied to details of the CPU, operating system and to a lesser extent, compiler, and basic C libraries. This makes it difficult to make it portable. Nonetheless, it is available for the following platforms:
Download Link:- https://github.com/tklengyel/valgrind