Memcheck detects pointer overrun and freed pointer deference errors.
One of the features is the ability to detect pointer overrun, allowing you to catch any attempt to access memory outside of the allocated space. Additionally, it can detect freed pointer deference, so any attempts to access memory locations that are no longer allocated will be caught.
Memcheck also logs double-free and realloc of already freed pointers as well as memory not freed on exit, which helps to minimize any potential memory leaks. It performs pointer underrun on free and realloc, which ensures that the program is not referenced outside of its allocated area.
One interesting feature of Memcheck is the ability to reverse the behavior of over- and underruns. Additionally, 'churning' reallocations to always return a different pointer, as well as logging pointer overruns instead of faulting, are extra features that might help optimize your program's memory usage.
While Memcheck has a small performance impact, it does come with a tradeoff of a large memory footprint. Nonetheless, with the inclusion of a validation test suite to verify correctness, Memcheck ensures that your program is operating optimally.
To make sure Memcheck is compatible with various architectures and platforms, it has been tested on Alpha, ARM, HPPA, PPC, ix86, IA64, rs6000, S390, SPARC, and SPARC64. In addition, it has been tested on OSF, FreeBSD, NetBSD, OpenBSD, Linux, HP/UX, Mac OSX, AIX, SCO, and Solaris.
Memcheck's newest release has some updates that are worth noting. For instance, some missing backtraces were fixed. Additionally, an atexit replacement has been implemented to catch allocations that are freed by previously installed atexit handlers. Lastly, deeper backtraces are stored, and internal recursions are handled.
Version 0.2.1: N/A