alloc_bootmem_cpumask_var(9)
πΈ alloc_bootmem_cpumask_var β a Kernel API Manual moment π
okay so bestie, we're in the alloc_bootmem_cpumask_var(9) era and honestly? it's giving "tiny function, huge consequences." buckle up π
β¨ NAME β¨
alloc_bootmem_cpumask_var β grab yourself a struct cpumask straight out of the bootmem arena π§Ίβ¨
π¦ SYNOPSIS π¦
void alloc_bootmem_cpumask_var (cpumask_var_t *mask );
that's it. that's the whole signature. no cap π«Ά
π ARGUMENTS π
maskβ a pointer to acpumask_var_t, and that's literally where your cpumask comes back to you. hand it the address, it hands you the goods π
π DESCRIPTION π
so here's the tea, and it's kind of a big deal π β this whole function is only defined when CONFIG_CPUMASK_OFFSTACK=y. if that config ain't set, it's a nop (it lives in <linux/cpumask.h>, iykyk).
when it does do its thing, it does one of exactly two things, and the range is honestly wild:
- it either returns an allocated (zero-filled) cpumask π β clean, fresh, zeros everywhere, main character energy
- or it causes the system to panic π β yes, fr fr, no in-between, no "sorry bestie, try again"
so like... iconic behavior, but also maybe hold your breath a little π
β οΈ real talk: "panics the system" is not a vibe, it's a hard failure. respect it.
π₯ SEE ALSO π₯
- the kernel file
./lib/cpumask.cβ that's where the lore lives π alloc_cpumask_var_node(9)free_cpumask_var(9)free_bootmem_cpumask_var(9)β the cleanup bestie, don't ghost it π«Άcpumask_local_spread(9)cpumask_any_and_distribute(9)cpumask_any_distribute(9)
and that's the whole page, slay π
β¨ this one's from ./lib, dated October 2026, and it ate, no crumbs. go allocate something zero-filled and stay hydrated πππ
π¦ 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