get_vm_area(9)
β¨ get_vm_area(9) β¨
okay bestie, welcome to the Kernel API Manual π
this one's a lil function from the ./mm directory and it's literally the "save me a spot" of kernel virtual memory. let's get into it π«Ά
πΈ NAME πΈ
get_vm_area β reserve a contiguous kernel virtual area π
β¨ SYNOPSIS β¨
struct vm_struct * get_vm_area (unsigned long size , unsigned long flags );
π ARGUMENTS π
sizeβ the size of the area, bestie. that's how much virtual space you're asking for π«flagsβ gotta beVM_IOREMAPfor I/O mappings, orVM_ALLOCπ
π¦ DESCRIPTION π¦
so what it does is: it searches for an area of size inside the kernel virtual mapping area, and then reserves it for our purposes π
(the original says "for out purposes" β yes queen, typos are canon, no cap π).
it returns the area descriptor on success, or NULL on failure. that's the whole vibe check π
β RETURN β
the area descriptor on success or NULL on failure π that's it, that's the whole return contract β if you get NULL, it did not slay π
π SEE ALSO π
this is the part where the manpage just flexes its whole friend group at you, so buckle up sis π the kernel file is ./mm/vmalloc.c and the whole squad is:
vunmap_range(9)vmap_pages_range(9)vm_area_map_pages(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)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)
like, that's the entire vmalloc extended universe fr fr π obsessed.
and that's the page, bestie π this lil gem comes to you from the ./mm source, dated October 2026, and it's living in the Kernel API Manual section 9. go reserve some virtual space, you icon πβ¨
π¦ 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