zap_vma_for_reaping(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zap_vma_for_reaping β€” kernel API manual, bestie edition πŸŽ€

okay so real talk, this one lives in the kernel API manual (section 9, the ✨iconic✨ one), and it's lowkey a whole mood: it yeets every single page table entry in a vma and it absolutely refuses to block while doing it. no cap. 😀


✨ NAME ✨

zap_vma_for_reaping β€” zap all page table entries in the vma without blocking πŸ§ΉπŸ’¨


🌸 SYNOPSIS 🌸

int zap_vma_for_reaping (struct vm_area_struct *vma );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • vma β€” the vma to zap. that's it. that's the one. the main character of this whole operation 🫢

πŸ’– DESCRIPTION πŸ’–

So what this does is, it zaps all page table entries in the vma β€” and the whole vibe is that it does it without blocking. Like, it's not gonna sit there and wait around, it's giving "i have places to be" energy. πŸƒβ€β™€οΈπŸ’¨

Who's it for? The oom killer. yes, that oom killer. the one who shows up when things are dire and starts making decisions. this function is basically the oom killer's little helper, so it can clear stuff out without getting stuck. πŸ’€βœ¨

⚠️ but listen β€” hugetlb vmas are not supported. not me showing up with a hugetlb vma and getting turned away πŸ™ˆ it's just not that girl, okay? don't try it.

⭐ RETURN ⭐

  • 0 β€” success, slay, we did it πŸ‘‘
  • -EBUSY β€” if we would have to block. nope, not today. blocking is not the vibe, so you get -EBUSY instead 😭

🌈 SEE ALSO 🌈

okay bestie, buckle up, because the friend group here is huge. all of these are from the kernel file ./mm/memory.c, iykyk:

literally the whole group chat. tell them i said hi πŸ’œ


and that's the page, bestie ✨ this little cutie comes to you from the source tree at ./mm, and it's dated October 2026 β€” so yes, it's from the future, and yes, it's still serving looks πŸŽ€ bye lovelies πŸ’…πŸ«Ά

πŸ“¦ where this page comes from