Android Memory Pressure and lmkd
Modern Android uses lmkd and, on supported kernels, PSI to react to real memory pressure. The existence of a kill is less important than what was killed and whether the system was thrashing.
01
Separate reclamation from instability
Killing a cached background process can be normal. Repeated kills of visible, persistent or system processes while users see freezes points to a more serious pressure event.
02
Read PSI with the rest of memory state
AOSP dumpstate includes /proc/pressure/cpu, memory and io on current releases. Combine PSI with meminfo, swap/zram and process memory; one snapshot alone cannot prove a leak.
03
Treat OOM type correctly
Java heap OOM, native allocation failure and kernel OOM are different problems. Identify the allocator/failure class before changing heap limits or LMK tuning.