memory-leak-detector is a native memory-leak monitoring tool developed by ByteDance (originally for their video-app team) that helps developers detect, diagnose, and manage memory leaks in native (e.g. C/C++) code across Android applications. It offers relatively simple integration and wide monitoring coverage: by configuring the tool (or via broadcast control), developers can start leak detection for specific native libraries or entire processes. Upon activation, it tracks allocations / memory maps, logs usage, and outputs reports that can be post-processed (e.g. via provided Python scripts) to list potential leak suspects — assisting in identifying leaks that traditional tools might miss. The detector supports stack unwinding, mapping analysis, and reporting, making it suitable for complex applications where native memory misuse can lead to crashes or performance degradation. It’s been used within major ByteDance apps for native-memory leak governance.
Features
- Monitoring of native (C/C++) memory allocations and memory-map usage at runtime
- Capability to target specific native libraries or entire processes for leak detection
- Stack unwinding and mapping support to help trace leaks back to source/native functions
- Reporting via logs and post-processing scripts (e.g. Python analysis) to generate leak-doubt reports
- Easy integration for Android projects via a Maven/JitPack dependency
- Broad applicability across apps — suitable for heavy native-code apps (video, media, high-performance tasks)