memory_grou...ster_dynamic(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– memory_group_register_dynamic(9) πŸ’–

okay so bestie, we're in the Kernel API Manual today and the star of the show is memory_group_register_dynamic β€” yes the header truncates it to memory_grou...ster_dynamic(9) but we know her full name, she's iconic like that ✨


🌸 NAME 🌸

memory_group_register_dynamic β€” register a dynamic memory group πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int memory_group_register_dynamic (int nid , unsigned long unit_pages );

that's the whole signature, no cap, she takes exactly two things and hands you back an int πŸ’…


⭐ ARGUMENTS ⭐

  • nid β€” the node id, literally just the node id, that's it 🫢
  • unit_pages β€” the unit in pages in which memory gets added/removed in this dynamic memory group πŸ“¦

🌈 DESCRIPTION 🌈

so what she does is: register a brand-new dynamic memory group and return the memory group id πŸ‘‘

memory inside a dynamic memory group is added/removed dynamically in unit_pages β€” that's the whole vibe, it's giving flexible, it's giving main character energy 🧚

πŸ’€ warning bestie: she returns an error if you're out of memory, if the node id is invalid, if no new memory groups can be registered, or if unit_pages is invalid β€” and "invalid" here means 0, not a power of two, or smaller than a single memory block. three separate ways to fumble it, don't be that girl 😭

otherwise? she returns the new memory group id. slay ✨


πŸ‘‘ SEE ALSO πŸ‘‘

peep these in the kernel file ./drivers/base/memory.c β€” she runs with a whole crew fr fr:


okay that's the whole page, ily, go register some dynamic memory groups responsibly πŸ’–

this lil manpage lives in ./drivers/base, dated October 2026, from the Kernel API Manual β€” mwah, see u next time bestie πŸ“πŸŒΈπŸ’œ

πŸ“¦ where this page comes from