__add_mem_range(9)
π __add_mem_range(9) π
okay so bestie, welcome to the Kernel API Manual page for __add_mem_range β yes the double-underscore one, she's the internal girlie π
stick around, this one's short and sweet.
β¨ NAME β¨
__add_mem_range β add a memory range to memory ranges list. that's it, that's the whole job π
πΈ SYNOPSIS πΈ
int __add_mem_range (struct crash_mem **mem_ranges , u64 base , u64 size );
like, she takes a pointer-to-pointer, a base, a size, and hands you back an int. iconic signature honestly π«Ά
π¦ ARGUMENTS π¦
mem_rangesβ the range list you're adding the memory range to. it's astruct crash_mem **, so yes, double pointer, she's fancy like that β¨baseβ base address of the range to add. it's au64, no cap πsizeβ size of the memory range to add. also au64πΈ
π₯ DESCRIPTION π₯
so what does she actually do? she (re)allocates memory, if needed. that's the vibe. only if needed, bestie β she's not out here allocating for fun π
and then:
- Returns
0on success - negative errno on error π
periodt. that's the whole description. short queen energy π
π SEE ALSO π
okay this list is long but we're not skipping a single one, every reference stays, iykyk π
She lives in the kernel file ./arch/powerpc/kexec/ranges.c, and here's her whole friend group:
get_max_nr_ranges(9)get_mem_rngs_size(9)__merge_memory_ranges(9)sort_memory_ranges(9)realloc_mem_ranges(9)add_mem_range(9)add_tce_mem_ranges(9)add_initrd_mem_range(9)add_htab_mem_range(9)add_kernel_mem_range(9)add_rtas_mem_range(9)add_opal_mem_range(9)add_reserved_mem_ranges(9)get_reserved_memory_ranges(9)get_exclude_memory_ranges(9)get_usable_memory_ranges(9)get_crash_memory_ranges(9)
like, she's got range(s) ππ (sorry, had to)
ngl bestie, the wholeadd_*_mem_rangefamily is basically a group chat and__add_mem_rangeis the one who actually does the adding. go read the others too, they're cute π§
and that's a wrap, bestie π this came from the Kernel API Manual, source path ./arch/powerpc/kexec, dated October 2026 β mwah, love u, go add some ranges πβ¨π
π¦ 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