vmemmap_remap_alloc(9)
π vmemmap_remap_alloc(9) π
okay so bestie, welcome to the Kernel API Manual β yes we're reading kernel docs together, this is our bonding era π«Ά. This page is all about vmemmap_remap_alloc, and ngl it's a whole vibe once you get past the intimidating name.
β¨ NAME β¨
vmemmap_remap_alloc β remaps the vmemmap virtual address range [@start, end) so it points at the page that comes from the @vmemmap_pages respectively. like, it's doing a little address-range glow-up π«
πΈ SYNOPSIS πΈ
int vmemmap_remap_alloc (unsigned long start , unsigned long end ,
unsigned long flags );
three unsigned longs walk into a function and return an int, no cap π
π ARGUMENTS π
startβ the start address of the vmemmap virtual address range we're remapping. the beginning of the glow-up zone, literally π¦endβ the end address of that same vmemmap virtual address range we're remapping. the range is[start, end), soendis the boundary, not included β periodt β¨flagsβ the modifications to thevmemmap_remap_walkflags. this is where you tell it how you want the walk to behave π―
π₯ RETURN π₯
0on success β slay, we ate π- a negative error code otherwise β it's giving "nope, not today" π
π SEE ALSO π
- Kernel file
./mm/hugetlb_vmemmap.cβ the source file where the magic lives, iykyk π§ struct vmemmap_remap_walk(9)vmemmap_remap_split(9)vmemmap_remap_free(9)hugetlb_vmemmap_restore_folio(9)hugetlb_vmemmap_restore_folios(9)hugetlb_vmemmap_optimize_folio(9)
all of these are the friend group of this function β go say hi π
lowkey reminder:startandendare a half-open range,[start, end), so don't be out here expectingendto be included, bestie π
and that's the page!! π this one lives in ./mm, dated October 2026, and it's filed under vmemmap_remap_alloc(9) β mwah, go forth and remap responsibly πβπ
π¦ 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