out_of_memory(9)
π out_of_memory β kill the "best" process when we run out of memory π
okay so real talk, this page lives in the Kernel API Manual and it is lowkey one of the most dramatic functions in the whole kernel. bestie, let's get into it π«Ά
β¨ SYNOPSIS β¨
bool out_of_memory (struct oom_control *oc );
that's it. that's the whole vibe. one arg, one bool back, infinite chaos potential π₯
π ARGUMENTS π
ocβ pointer tostruct oom_control. yes queen, it's a pointer, and it's the whole context of the crime scene you're about to investigate π
π¦ DESCRIPTION π¦
okay so picture this: we ran out of memory. not a drill. the system is fully out here struggling, and we have exactly a few choices, and ngl they are all kind of a lot:
- kill a random task β bad π
- just let the whole system crash β worse π
- or β¦ try to be smart about which process to kill π
and that third option? that's the main character energy this function is serving β¨
note that we don't have to be perfect here β we just have to be good. and honestly? relatable. we're not aiming for flawless, we're aiming for functional π
π SEE ALSO π
- Kernel file
./mm/oom_kill.cβ the source, iykyk π oom_cpuset_eligible(9)oom_badness(9)dump_tasks(9)mark_oom_victim(9)exit_oom_victim(9)oom_killer_enable(9)oom_killer_disable(9)
all of these are literally the supporting cast and every single one of them ate π β¨
fr fr though: this whole thing lives under ./mm and was last touched in October 2026. slay, documented, periodt. πππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms