vma_alloc_ze...ovable_folio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vma_alloc_ze...ovable_folio(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so this is from the Kernel API Manual, section 9 (kernel routines, iykyk), and the page name is literally vma_alloc_ze...ovable_folio(9) β€” yes it's truncated, no we're not fixing it, it's iconic that way ✨


🌸 NAME 🌸

vma_alloc_zeroed_movable_folio β€” bestie, it allocates a zeroed page for a VMA. that's the whole vibe. 🫢


✨ SYNOPSIS ✨

struct folio * vma_alloc_zeroed_movable_folio (struct vm_area_struct
*vma , unsigned long vaddr );

like, you hand it a VMA and a vaddr and it gives you back a struct folio *. simple. clean. slay. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • vma β€” the VMA the page is gonna be allocated for. it's giving "here's the neighborhood, find me a house" 🏑
  • vaddr β€” the virtual address the page will be inserted into. this is the exact spot, no cap πŸ“

πŸ’– DESCRIPTION πŸ’–

so this function will allocate a page suitable for inserting into this VMA at this virtual address. literally that's it, that's the job. πŸ’€

it may be allocated from highmem or the movable zone β€” highkey depends on the situation, we don't gatekeep. and bestie, important detail: an architecture may provide its own implementation. so like, your arch might have main character energy and do its own thing. don't @ me. πŸ‘‘


⭐ RETURN ⭐

you get a folio containing one allocated and zeroed page πŸŽ€ …or NULL if we are out of memory 😭 (yes, the OOM jumpscare is real, no cap).


🌈 SEE ALSO 🌈

Kernel file ./include/linux/highmem.h β€” go read it, it's lowkey the source of truth. and then the whole kmap cinematic universe, in this exact order:

kmap(9), kunmap(9), kmap_to_page(9), kmap_flush_unused(9), kmap_local_page(9), kmap_local_folio(9), kmap_atomic(9), clear_user_page(9), clear_user_pages(9), clear_user_highpage(9), clear_user_highpages(9), memcpy_from_folio(9), memcpy_to_folio(9), folio_zero_tail(9), folio_fill_tail(9), memcpy_from_file_folio(9), folio_zero_segments(9), folio_zero_segment(9), folio_zero_range(9), folio_release_kmap(9)

all of them. every single one. I said what I said. πŸ—£οΈπŸ”₯


and that's the page!! mwah πŸ’‹ this one lives in ./include/linux and it's dated October 2026 β€” yes, future core, we stay ahead of the timeline πŸ•°οΈβœ¨ hope this helped bestie, go zero some pages responsibly πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from