vzalloc_node(9)
β¨ vzalloc_node(9) β the manual, but make it bestie β¨
okay so this is the whole page for vzalloc_node, a Kernel API function from the ./mm corner of the world, and I'm gonna walk you through literally all of it. no gatekeeping, periodt. π
πΈ NAME πΈ
vzalloc_node β allocate memory on a specific node with zero fill
like, it grabs a chunk of memory on the NUMA node you pick AND zeroes it out for you. that's the whole vibe. π«Ά
π SYNOPSIS π
void * vzalloc_node (unsigned long size , int node );
yes bestie, that's the signature. memorize it or screenshot it, either works. πΈ
π ARGUMENTS π
sizeβ the allocation size. how much memory you're asking for, that's it.nodeβ the numa node. which node you want it on. choose wisely. β¨
π¦ DESCRIPTION π¦
okay so what actually happens: it allocates enough pages to cover size from the page level allocator, and then it maps them into contiguous kernel virtual space. so you get one nice contiguous virtual block even though the underlying pages are just... pages.
and the memory allocated is set to zero. zero fill, automatic, no extra steps. iconic behavior honestly. π§
β RETURN β
- pointer to the allocated memory β slay, you got your block π
- or
NULLon error β not slay, something went wrong π
π₯ SEE ALSO π₯
the whole friend group, fr fr. this is the long list and I'm not skipping a single one, no cap:
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)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)
they're all in the Kernel file ./mm/vmalloc.c, iykyk. ποΈ
reminder bestie: this is the ./mm manual page, dated October 2026. if your kernel is older or newer, double-check before you go touching memory allocation, fr. π
and that's the page! ./mm source, October 2026 date, vzalloc_node(9) title β all accounted for. mwah, go allocate responsibly πβ¨π·
π¦ 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