Skip to content

Code for lighting talk about Valgrind and Valgrind tools. Usage examples and more.

Notifications You must be signed in to change notification settings

the-risk-taker/valgrind

Repository files navigation

Valgrind

valgrind

Some examples of Valgrind and Valgrind tools:

  • Memcheck
  • Cachegrind
  • Callgrind
  • KCachegrind
  • Helgrind
  • DRD
  • Massif

Building

Building examples with CMake (from repository root directory):

cmake -S . -B <build_dir> -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build <build_dir>

NOTE: We want a debug information to feed Valgrind so -DCMAKE_BUILD_TYPE=RelWithDebInfo. Sometimes some optimizations are needed as well.

Running

There are runnable targets, for example: run-helgrind-example, to run call:

cmake --build <build_dir> --target run-helgrind-example

Check CMakeLists.txt in each directory to find runnable examples.

About

Code for lighting talk about Valgrind and Valgrind tools. Usage examples and more.

Topics

Resources

Stars

Watchers

Forks