vma_anon_address(9)
π 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 π¦
- Kernel file
./mm/internal.h folio_pte_batch_flags(9)pte_move_swp_offset(9)pte_next_swp_offset(9)swap_pte_batch(9)sync_with_folio_pmd_zap(9)folio_evictable(9)vma_filebacked_address(9)
signed off by your ./mm source bestie, version vma_anon_address(9), dated October 2026 ππ«Ά
π¦ 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