vunmap(9)
π vunmap(9)
okay so real talk, this is the page for vunmap from the Kernel API Manual β no cap, it's the breakup anthem for a mapping that vmap() set you up with π
β¨ NAME β¨
vunmap β release a virtual mapping that you got from vmap() π«Ά like, it's the undoing. the "we're done here" of kernel virtual memory.
π SYNOPSIS π
void vunmap (const void *addr );
that's it. one argument. it returns void, so there's literally nothing to check, don't come for me π
πΈ ARGUMENTS πΈ
addrβ the memory base address, bestie. this is the starting address of the area you're about to hand back β¨
π¦ DESCRIPTION π¦
So vunmap() frees the virtually contiguous memory area that starts at addr β and that area has to be one that was created from the page array you passed to vmap. not a cousin, not a lookalike, the actual one π
π¨ vibe check: this must NOT be called in interrupt context. like, at all. it's giving "sleepy function, do not disturb" π΄ β don't be the person who tries it in an interrupt, i'm begging π
π SEE ALSO π
the whole fam lives in the kernel file ./mm/vmalloc.c π and honestly? iconic lineup. go say hi:
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)get_vm_area(9)find_vm_area(9)remove_vm_area(9)vfree_atomic(9)vfree(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)
okay that's the whole page, ty for coming to my ted talk π«Ά this one's from the ./mm corner of the world, dated October 2026, and yes the header said vunmap(9) and the footer said vunmap(9) again because consistency is main character energy πβ¨ go free your mappings responsibly, ily π
π¦ 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