An instrumentation framework for building dynamic analysis tools
open sourceGPL-3.0-or-laterfree
Valgrind is an instrumentation framework for dynamic analysis of compiled programs, best known for Memcheck, which finds memory management bugs such as leaks, invalid reads and writes and use of uninitialised memory. It ships seven production tools: the memory error detector, two thread error detectors, a cache and branch-prediction profiler, a call-graph profiler and two heap profilers, and you can build new tools on it. It runs on Linux across many architectures, FreeBSD, Solaris, Android and older Intel Macs.
Ways to install
Package managers
Problems it solves
- find the memory leak in my C++ program
- track down invalid reads and use of uninitialised memory in C code
- find data races between threads in a native program
Features
- Memcheck memory error and leak detector
- Helgrind and DRD thread error detectors
- Cachegrind and Callgrind profilers
- Massif and DHAT heap profilers
Limitations
- macOS support stops at macOS 13 Ventura and Intel (amd64) Macs only: Apple silicon Macs aren't supported3