cap_vm_enough_memory(9)
β¨ 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 β
0if 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:
cap_capable_helper(9)cap_capable(9)cap_settime(9)cap_ptrace_access_check(9)cap_ptrace_traceme(9)cap_capget(9)cap_capset(9)cap_inode_need_killpriv(9)cap_inode_killpriv(9)kuid_root_in_ns(9)rootid_from_xattr(9)cap_convert_nscap(9)get_vfs_caps_from_disk(9)cap_bprm_creds_from_file(9)cap_inode_setxattr(9)cap_inode_removexattr(9)cap_task_fix_setuid(9)cap_task_setscheduler(9)cap_task_setioprio(9)cap_task_setnice(9)cap_task_prctl(9)cap_mmap_addr(9)
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
- 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