Memcheck
Memcheck is a memory error detector within the Valgrind instrumentation framework. It checks programs for memory management problems in C, C++, and related languages by executing the program under Valgrind’s dynamic instrumentation. Memcheck can detect uninitialized reads, reads and writes to freed or unallocated memory, buffer overruns, and memory leaks, among other errors.
How Memcheck works: It uses a shadow memory model to track the state of every byte of
Usage: Typical workflow is to compile with debugging symbols and run under Valgrind, for example: valgrind --tool=memcheck
Limitations and scope: Memcheck detects many common memory errors but is not a general debugger and can
History and relation: Memcheck is the most widely used tool in the Valgrind suite, developed as part