memblock_is_region_reserved(9)
π memblock_is_region_reserved(9) π
okay so bestie, welcome to the Kernel API Manual π β yes the actual kernel, not your laptop's kernel of truth or whatever. this one's a little bool-returning darling from the memblock world and honestly? she's iconic for it.
β¨ NAME β¨
memblock_is_region_reserved β the "wait, is somebody already sitting there?" check for reserved memory πͺπ
πΈ SYNOPSIS πΈ
bool __init_memblock memblock_is_region_reserved (phys_addr_t base ,
phys_addr_t size );
like, she takes two args, returns a bool, and she's marked __init_memblock so you know she lives in init-land. periodt. π
π¦ ARGUMENTS π¦
baseβ the base of the region you wanna check π (like, where does your little region start)sizeβ the size of the region you're checking π (and yes she needs it, the region's a range, not a single point)
π DESCRIPTION π
So the whole vibe here: she checks if the region [base, base + size) intersects a reserved memory block. that's it. that's the function. π«Ά
notice the half-open interval, bestie β [base, base + size) β the opening bracket is closed (base included) and the closing one is open (base + size not included). math girlies get it. no cap. π₯
β RETURN β
- True if they intersect π₯ β your region and a reserved block are lowkey overlapping
- False if not π β you're in the clear, go off
π SEE ALSO π
okay this list is LONG, so buckle up bestie, we're going through the whole memblock friend group π§ββοΈ:
- Kernel file
./mm/memblock.cβ the mothership π« memblock overview(9)__memblock_find_range_bottom_up(9)__memblock_find_range_top_down(9)memblock_find_in_range_node(9)memblock_find_in_range(9)memblock_discard(9)memblock_double_array(9)memblock_merge_regions(9)memblock_insert_region(9)memblock_add_range(9)memblock_add_node(9)memblock_add(9)memblock_validate_numa_coverage(9)memblock_isolate_range(9)memblock_free(9)memblock_phys_free(9)memblock_setclr_flag(9)memblock_mark_hotplug(9)memblock_clear_hotplug(9)memblock_mark_mirror(9)memblock_mark_nomap(9)memblock_clear_nomap(9)memblock_reserved_mark_noinit(9)memblock_reserved_mark_kern(9)memblock_mark_kho_scratch(9)memblock_clear_kho_scratch(9)__next_mem_range(9)__next_mem_range_rev(9)memblock_set_node(9)memblock_alloc_range_nid(9)memblock_phys_alloc_range(9)memblock_phys_alloc_try_nid(9)memblock_alloc_internal(9)memblock_alloc_exact_nid_raw(9)memblock_alloc_try_nid_raw(9)memblock_alloc_hugetlb(9)memblock_alloc_try_nid(9)__memblock_alloc_or_panic(9)memblock_estimated_nr_free_pages(9)memblock_is_region_memory(9)memblock_free_all(9)reserve_mem_find_by_name(9)reserve_mem_release_by_name(9)
she really said "and here's everyone I know" ππ but honestly? main character energy for knowing all of them.
kisses from the ./mm directory π β that's the source/version bestie, and she's dated October 2026 because she's from the future and she's still serving π°οΈβ¨ slay. mwah, see u in the next manpage π«Άπ
π¦ 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