Valgrind is an instrumentation framework for building dynamic analysistools. There are Valgrind tools that can automatically detect manymemory management and threading bugs, and profile your programs indetail. You can also use Valgrind to build new tools. The Valgrinddistribution currently includes six production-quality tools: a memoryerror detector (memcheck, the default tool), two thread errordetectors (helgrind and drd), a cache and branch-prediction profiler(cachegrind), a call-graph generating cache and branch-predictionprofiler (callgrind), and a heap profiler (massif).