

The first four categories indicate different kinds of memory blocks that weren't freed before the program ended.

Memcheck reports leaks in five categories: definitely lost, indirectly lost, possibly lost, still reachable, and suppressed. myprog might produce the following summary: When you run Valgrind on your program without any additional arguments, it produces a summary of the different kinds of leaks it has detected. But for now, we will discuss memory leak detection with Memcheck. It will also notify you about bad or double deallocation of memory blocks. It warns about the use of (partially) undefined values in conditional code or passing such values to system calls. For instance, it detects reads or writes before or after allocated memory blocks. The tool can detect many different memory errors.

Memcheck tracks all memory reads, writes, allocations, and deallocations in a C or C++ program.
