Memcheck is Valgrind’s dynamic analysis tool for detecting memory errors and memory leaks. On Linux, it provides highly accurate evidence when a specific leak needs definitive diagnosis, especially before release. section 7.4.1
Use Memcheck as a targeted investigation tool rather than a routine development monitor:
- Run it when memory continues growing after expected startup activity or when users report problems after prolonged use. section 7.4.1
- Reserve it for focused checks and release preparation because its instrumentation slows applications significantly. section 7.4.1
- Use Heaptrack for regular development and timeline-based growth analysis, then use Memcheck when the leak requires a definitive answer. section 7.4.1
