pcpu_free_vm_areas(9)
π pcpu_free_vm_areas β like, the Kernel API Manual page (section 9, bestie) π
okay so quick vibe check: this is pcpu_free_vm_areas(9) from the Kernel API Manual, and she is the cleanup queen π. Think of her as the friend who comes over after the party and takes the recycling out β nobody throws her a parade, but without her you'd be drowning in vm_structs. no cap.
β¨ NAME β¨
pcpu_free_vm_areas β frees the vmalloc areas for the percpu allocator π§Ήπ
like, that's the whole job. she's the deallocator. the "you're welcome" at the end of the story.
πΈ SYNOPSIS πΈ
void pcpu_free_vm_areas (struct vm_struct **vms , int nr_vms );
the way that signature is just... so simple. two args. no return value. she doesn't even need to text you back, she just does it π
π¦ ARGUMENTS π¦
vmsβ avm_structpointer array, and it has to be the one thatpcpu_get_vm_areasgave you. like, this is not a "bring your own pointer" situation bestie π she needs her own receipts back.nr_vmsβ the number of allocated areas. exactly how many. count them. periodt π₯
β DESCRIPTION β
okay so here's the tea: this function frees the vm_structs and the array that was allocated by pcpu_get_vm_areas. both. the structs and the array. not me being obsessed with a function that actually cleans up after itself ππ«Ά
it's giving "responsible main character energy." she frees everything her sibling pcpu_get_vm_areas allocated, and honestly? iconic.
ngl, this is a pairing thing β if you didn't get thosevmsfrompcpu_get_vm_areas, you are not the target audience for this function. read the room π
π SEE ALSO π
here come the mutuals β all of them, fr fr. the whole ./mm/vmalloc.c kernel file family reunion π:
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)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)
like I said. the whole friend group π
and that's the page, bestie! this lil transmission came from the ./mm corner of the kernel, dated October 2026 β so go free those areas, hydrate, and remember: cleanup is a love language π«Άβ¨π
π¦ 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