Some examples of Valgrind and Valgrind tools:
- Memcheck
- Cachegrind
- Callgrind
- KCachegrind
- Helgrind
- DRD
- Massif
Building examples with CMake (from repository root directory):
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallelNote
We need debug information to feed Valgrind and some optimizations might also be necessary to have less noisy output, hence the -DCMAKE_BUILD_TYPE=RelWithDebInfo option.
There are runnable targets, for example: run-helgrind-example, to run, use the following command:
cmake --build build --target run-helgrind-exampleCheck CMakeLists.txt in each directory to find runnable examples.
 Valgrind Logo](/the-risk-taker/valgrind/raw/main/valgrind.png)