cap_vm_enough_memory(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ cap_vm_enough_memory(9) ✨

okay bestie, welcome to the Kernel API Manual πŸ’… today we're looking at cap_vm_enough_memory from the cap_* family β€” yes, the whole friend group is in SEE ALSO, we'll get there 🫢


🌸 NAME 🌸

cap_vm_enough_memory β€” Determine whether a new virtual mapping is permitted ✨

Like, the vibe check for "can this task please have some more virtual memory" πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int cap_vm_enough_memory (struct mm_struct *mm , long pages );

Two args, no cap, that's the whole signature πŸ’–


πŸ’œ ARGUMENTS πŸ’œ

  • mm β€” The VM space in which the new mapping is to be made. the address space we're asking about 🧚
  • pages β€” The size of the mapping. in pages, obvi πŸ“

🌈 DESCRIPTION 🌈

Determine whether the allocation of a new virtual mapping by the current task is permitted. that's literally it, that's the whole plot 😭 the current task wants a new virtual mapping and this function is the one deciding if that's allowed to happen πŸ’…


⭐ RETURN ⭐

  • 0 if permission granted πŸ‘‘
  • negative error code if not πŸ’€

so like, zero means slay, negative means not slay, iykyk 🫢


πŸŽ€ SEE ALSO πŸŽ€

Kernel file ./security/commoncap.c and the entire cap squad, fr fr:

that's twenty-two (22) siblings bestie, main character energy all around 🌸


so yeah, that's the whole page β€” short and iconic, lowkey one of the easiest reads in the manual πŸ’–

sign-off time πŸŽ€ this lil page comes from ./security and it's dated October 2026 β€” and the manual calls itself cap_vm_enough_memory(9) all over again at the bottom like a little mirror selfie πŸͺž stay hydrated, read your manpages, mwah πŸ’‹

πŸ“¦ where this page comes from