DECLARE_NEXT_HOLE_ADDR(9)
π DECLARE_NEXT_HOLE_ADDR(9) π
ok so bestie, welcome to the Kernel API Manual β this one's a macro page, subsection 9, and no cap it's giving "tiny macro, very demure, extremely important" energy. let's get into it π
β¨ NAME β¨
DECLARE_NEXT_HOLE_ADDR β it's literally a macro that declares next hole functions. that's the whole vibe. π³οΈβ¨
πΈ SYNOPSIS πΈ
DECLARE_NEXT_HOLE_ADDR (name , first , last );
look at her. three args, no notes. π«Ά
π¦ ARGUMENTS π¦
nameβ the name of the function you're declaring. yes babe you get to pick it, main character energy fr.firstβ the first rb member to traverse. and it has to be eitherrb_leftorrb_rightβ pick one, king πlastβ the last rb member to traverse. also eitherrb_rightorrb_left. yes it's the mirror offirst, we love symmetry π«
π DESCRIPTION π
okay so here's the tea β β this macro declares a function that returns the next hole of the addr rb tree. like, the function that goes hunting for the next gap. π³οΈπ
and while we're traversing the tree, we take the searched size into account. the way that this is so smart?? π we only visit branches that have potential big enough holes. no wasting time on tiny gaps, we're not doing that today. efficiency slay. π π₯
π SEE ALSO π
the whole squad, assembled β:
- Kernel file
./drivers/gpu/drm/drm_mm.cOverview(9) drm_mm_reserve_node(9)drm_mm_insert_node_in_range(9)drm_mm_remove_node(9)lru scan roster(9)drm_mm_scan_init_with_range(9)drm_mm_scan_add_block(9)drm_mm_scan_remove_block(9)drm_mm_scan_color_evict(9)drm_mm_init(9)drm_mm_takedown(9)drm_mm_print(9)
go read them, iykyk π§π
ngl bestie, this page lives in./drivers/gpu/drmand it's stamped October 2026 β so if you're readingDECLARE_NEXT_HOLE_ADDR(9)and it's not October 2026 anymore, that's just the version tag doing its thing. mwah, bye ππβ¨
π¦ 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