vma_anon_address(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vma_anon_address(9) β€” bestie edition πŸ’…

okay so this page is straight out of the Kernel API Manual, and it's giving β€œwhere does this anonymous page range actually live in virtual memory?” energy. let's get into it πŸ¦‹

🌸 NAME 🌸

vma_anon_address β€” find the virtual address an anonymous page range is mapped at. no cap, that's the whole vibe ✨

πŸŽ€ SYNOPSIS πŸŽ€

unsigned long vma_anon_address (const struct vm_area_struct *vma ,
       pgoff_t pgoff_anon , unsigned long nr_pages );

πŸ’– ARGUMENTS πŸ’–

  • vma β€” the VMA which maps this object. she's the main character of the mapping situation πŸ‘‘
  • pgoff_anon β€” the anonymous page index belonging to the folio. literally the page's little name tag πŸ“
  • nr_pages β€” the number of pages to consider. the page count, bestie πŸ”’

πŸ”₯ DESCRIPTION πŸ”₯

okay important caveat incoming: this is only valid for anonymous or MAP_PRIVATE-mapped file-backed VMAs. that's the whole validity situation, don't come for me with other VMA types 😭

⭐ RETURN ⭐

if any page in this range is mapped by this VMA, it returns the first address where any of these pages appear. slay ✨

otherwise? it returns -EFAULT. and that's on periodt πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹


signed off by your ./mm source bestie, version vma_anon_address(9), dated October 2026 πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from