KOOM is Kwai's toolkit for high-performance online memory monitoring on mobile. It reports when out-of-memory-related problems occur and is available for Android apps.
Overview
KOOM is an out-of-memory-oriented monitoring solution for mobile platforms, developed by Kwai. It provides online memory monitoring that can produce detailed reports when OOM-related problems are detected, and the authors state it has addressed many OOM issues in the Kwai application.
The tooling is framed for complex mobile apps where prevention and recovery alone are insufficient and continuous monitoring is needed. Described capabilities include monitoring leakage on the Java heap, native heap, and threads, with plans noted for broader multi-dimensional monitoring.
The Java leak module uses a copy-on-write approach to fork a child process for heap dumps, intended to avoid long application freezes during dumps. A native leak monitor module and a thread leak module hook thread lifecycle and report leaked thread information periodically. Native modules support both c++shared and c++static linking modes.
Integration is via Gradle dependencies on modules such as koom-java-leak, with a documented minimum SDK of 18 for all modules. The project is currently described as available on Android.
Key features
- Online OOM and memory issue reporting
- Java heap leak monitoring module
- Native heap leak monitoring
- Thread leak lifecycle hooks
- Child-process heap dump via copy-on-write
- Gradle module integration
- c++shared and c++static native modes
Use cases
- Diagnosing OOM crashes in Android production apps
- Java heap leak detection with reduced dump stalls
- Native memory leak analysis on mobile
- Thread leak tracking in long-running clients
- Stability work on memory-heavy mobile features