__add_mem_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __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 a struct crash_mem **, so yes, double pointer, she's fancy like that ✨
  • base β€” base address of the range to add. it's a u64, no cap πŸ’œ
  • size β€” size of the memory range to add. also a u64 🌸

πŸ”₯ 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 0 on 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:

like, she's got range(s) πŸ˜­πŸ’€ (sorry, had to)


ngl bestie, the whole add_*_mem_range family is basically a group chat and __add_mem_range is 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