out_of_memory(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 to struct 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 🌈

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