vm_area_map_pages(9)
π vm_area_map_pages(9) β from the Kernel API Manual, bestie β¨
okay so real talk, this one lives in section 9 of the Kernel API Manual and it's all about getting your pages mapped inside a sparse vm_area. no cap, it's a little baddie with a big job π«Ά
πΈ NAME πΈ
vm_area_map_pages β map pages inside given sparse vm_area π
like. literally. that's the whole gig. it takes a sparse vm_area and maps pages inside it. iconic behavior only π
β¨ SYNOPSIS β¨
int vm_area_map_pages (struct vm_struct *area , unsigned long start ,
unsigned long end , struct page **pages );
there she is π four args, returns an int, and yes we are copying it exactly, spaces before the commas and all, because that's just how the page is and we respect it π
π ARGUMENTS π
areaβ thevm_areaitself. the main character of this whole situation πstartβ start address insidevm_area. where the mapping begins, bestie πendβ end address insidevm_area. where it stops. the other end. the closing bracket of vibes π¦pagesβ the pages to map. and heads up: these are alwaysPAGE_SIZEpages β that's just the rule, no exceptions, fr fr π
π₯ SEE ALSO π₯
Kernel file ./mm/vmalloc.c β and okay, the friend group here is huge, so let me just introduce everybody π
vunmap_range(9)vmap_pages_range(9)vm_area_unmap_pages(9)new_vmap_block(9)vm_unmap_aliases(9)vm_unmap_ram(9)vm_map_ram(9)vm_area_add_early(9)vm_area_register_early(9)get_vm_area(9)find_vm_area(9)remove_vm_area(9)vfree_atomic(9)vfree(9)vunmap(9)vmap(9)vmap_pfn(9)__vmalloc_node_range(9)__vmalloc_node(9)vmalloc(9)vmalloc_huge_node(9)vzalloc(9)vmalloc_user(9)vmalloc_node(9)vzalloc_node(9)vrealloc_node_align(9)vmalloc_32(9)vmalloc_32_user(9)vread_iter(9)remap_vmalloc_range_partial(9)remap_vmalloc_range(9)pvm_find_va_enclose_addr(9)pvm_determine_end_from_reverse(9)pcpu_get_vm_areas(9)pcpu_free_vm_areas(9)
that's the whole squad, go say hi to all of them πβ¨
ngl if you got here from a "see also" rabbit hole, welcome, you're one of us now π§ββοΈ
and that's the page!! signed off from ./mm, dated October 2026, under the name vm_area_map_pages(9) β mwah, slay, periodt πππΈ
π¦ 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