memory_block_aligned_range(9)
π NAME π
okay so bestie, this is the memory_block_aligned_range(9) page from the Kernel API Manual β and it does exactly what it says on the tin: align a physical address range to memory blocks. No cap. π«Ά
β¨ SYNOPSIS β¨
struct range memory_block_aligned_range (const struct range *range );
πΈ ARGUMENTS πΈ
rangeβ the input range to align. That's the range you're handing over for a little boundary glow-up. π
π¦ DESCRIPTION π¦
So the way this works: it aligns the start address up and the end address down to memory block boundaries. It's giving "snap it to the grid," and honestly? Iconic. β¨
This is required for memory hotplug operations which must operate on memory-block aligned ranges. Like, hotplug is not about to deal with a range that's off by a little sliver β it needs the block-aligned version, periodt. π₯
It returns the aligned range. π
bestie, quick vibe check: callers should check that the returned range is valid (aligned.start < aligned.end) before using it. Don't skip this, fr fr. π
π SEE ALSO π
Kernel file ./include/linux/memory.hstruct memory_group(9)
mwah π β source/version is ./include/linux, dated October 2026, and this was the memory_block_aligned_range(9) page signing off. ππ¦π
π¦ 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