get_max_nr_ranges(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ get_max_nr_ranges(9) โœจ

okay bestie, welcome to the Kernel API Manual ๐Ÿ’… this one's a lil function page and it's honestly so chill โ€” we're just doing math about memory, no cap ๐Ÿงฎโœจ


๐ŸŒธ NAME ๐ŸŒธ

get_max_nr_ranges โ€” get the max no. of ranges a crash_mem structure could hold, given the size allocated for it ๐Ÿซถ

like. you gave it some bytes. it tells you how many ranges fit in those bytes. that's the whole vibe. iconic honestly ๐Ÿ‘‘


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

unsigned int get_max_nr_ranges (size_t size );

that's it. one argument. one unsigned int coming back at you. minimal, clean, main character energy โญ


๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • size โ€” the allocation size of the crash_mem structure ๐Ÿ’– like, how much room did you set aside for it? that's the number this parameter wants. give it the size, get back the count. slay.

๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

it returns the maximum no. of ranges โœจ that's literally the entire job description and honestly? respect. it knows what it is and it does not pretend otherwise ๐Ÿ’…

you hand it the size allocated for the crash_mem structure, it hands you back the max number of ranges that structure could hold. done. no drama, no side quests, no extra params. periodt ๐Ÿ”ฅ


๐Ÿ’œ SEE ALSO ๐Ÿ’œ

okay so this is the part where we shout out the whole friend group ๐Ÿซถ the kernel file lives at ./arch/powerpc/kexec/ranges.c and here's every single one of its besties, no gatekeeping:

that's the whole squad, go read them too iykyk ๐Ÿ“šโœจ


ngl there's nothing dangerous here, bestie โ€” it's a pure "give me a number, i'll give you a number" situation. no gotchas, no undefined behaviour, we're safe ๐Ÿ’€๐Ÿซถ

and that's a wrap on this page ๐ŸŽ€ brought to you by the source at ./arch/powerpc/kexec, dated October 2026, from the Kernel API Manual โ€” see you in the next manpage, bestie ๐Ÿ’–โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from