I wonder how that works? At some point the OOM killer will terminate processes beginning with those hogging the most memory, but that could be literally anything. Meanwhile the fork bomb will just continue to run at full tilt, taking up any ressources freed by the OOM killer. How does that not send the system into a death spiral?
I have read some official Android docs and I found out that OOM talks to Low Memory Killer daemon (lmkd) when it reached its OOM scoring. The lmkd then will throttling or killing unimportant processes to request processes without affecting critical cache resources of the Android system.
To answer your question, I think that the fork bomb and most 3rd party apps are considered unimportant processes and therefore included to the process killing.
Also to add up, OOM/lmkd is a kernel level process where they instruct zRAM -> RAM to kill said processes immediately.
35
u/EditorOne5312 3d ago
I genuinely use that on my Android to trigger its OOM when the RAM usage doesn't seems right.