Valgrind Basics
Detect leaks and errors.
What Is Valgrind?
Valgrind is an instrumentation framework. Its default tool, Memcheck, detects memory leaks and errors without recompiling, by running your program on a synthetic CPU.
Running Memcheck
Invoke Valgrind in front of your program. Build with -g first for line numbers.
g++ -g main.cpp -o app
valgrind --leak-check=full ./appAll lessons in this course
- Using gdb and lldb
- AddressSanitizer
- UBSan and TSan
- Valgrind Basics