vmalloc_huge_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

vmalloc_huge_node β€” allocate virtually contiguous memory, allow huge pages. and welcome to the vmalloc_huge_node(9) page from the Kernel API Manual, bestie πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

void * vmalloc_huge_node (unsigned long size , gfp_t gfp_mask , int node
);

πŸŽ€ ARGUMENTS πŸŽ€

  • size β€” the allocation size ✨
  • gfp_mask β€” flags for the page level allocator 🫢
  • node β€” node to use for allocation or NUMA_NO_NODE πŸ‘‘

πŸ’… DESCRIPTION πŸ’…

okay so here’s the tea: it allocates enough pages to cover size from the page level allocator and maps them into contiguous kernel virtual space. literally the whole point, no cap.

and if size is greater than or equal to PMD_SIZE, it’s allowed to use huge pages for the memory. periodt πŸ’«

vibe check: enough pages to cover size, mapped into contiguous kernel virtual space, with huge-page permission when size is greater than or equal to PMD_SIZE πŸ¦‹

⭐ RETURN ⭐

pointer to the allocated memory or NULL on error 😭


πŸ’« SEE ALSO πŸ’«

the original starts with Kernel file ./mm/vmalloc.c, and then the whole vmalloc bestie group chat is:


xoxo, this one came from the ./mm source, October 2026 edition β€” vmalloc_huge_node(9) signing off πŸŽ€βœ¨

πŸ“¦ where this page comes from