memory_grou...ster_dynamic(9)
π 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 ifunit_pagesis invalid β and "invalid" here means0, 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:
memory_block_advise_max_size(9)memory_block_advised_max_size(9)memory_block_add_nid_early(9)walk_memory_blocks(9)for_each_memory_block(9)memory_group_register_static(9)memory_group_unregister(9)
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
- 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