vzalloc_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 NULL on 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:

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