dmem_cgroup_register_region(9)
π dmem_cgroup_register_region(9) π
okay bestie, so this is a page from the Kernel API Manual and it's literally about dmem_cgroup_register_region β yes that's a whole mouthful, iykyk π«Ά stay with me, it's actually slay.
β¨ NAME β¨
dmem_cgroup_register_region β registering a region for the dev cgroup, no cap π
π¦ SYNOPSIS π¦
struct dmem_cgroup_region * dmem_cgroup_register_region (const struct
dmem_cgroup_init *init , const char *fmt , ... );
like, that's the whole signature, copy it exactly bestie, don't freestyle it π
πΈ ARGUMENTS πΈ
initβ the init fam: initialization parameters for the region, periodt β¨fmtβ the region parameters you're registering, okayurr π...β variable arguments, the lil extras, she's flexible like that π
π§ DESCRIPTION π§
so here's the vibe: this function registers a node in the dmem cgroup, using the name you gave it. not me being obsessed with naming things correctly π
the important part, bestie, is that after you call this function, the region can be used for allocations. like, that's the whole glow-up. register first, allocate after. main character energy only ππ₯
β RETURN β
NULLor a struct on success π«ΆPTR_ERRon failure π
that's it, that's the return, no extra lore, don't @ me.
π SEE ALSO π
the kernel file is right here, iconic: ./kernel/cgroup/dmem.c
and the whole friend group, all of them, every single one, no skipping:
dmem_cgroup_state_evict_valuable(9)dmem_cgroup_unregister_region(9)dmem_cgroup_pool_state_put(9)dmem_cgroup_uncharge(9)dmem_cgroup_try_charge(9)dmem_cgroup_below_min(9)dmem_cgroup_below_low(9)dmem_cgroup_get_common_ancestor(9)
ok that's the whole page, bestie. go register your region. slay π
as for the boring paperwork at the bottom β that's ./kernel/cgroup, October 2026, and the page itself is dmem_cgroup_register_region(9). mwah, bye πβ¨
π¦ 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