memblock_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ memblock_add(9) ✨

okay so bestie, welcome to the memblock_add page πŸ’– this one lives in the Kernel API Manual and it's genuinely the moment your kernel tells the memory allocator "hey, there's a new region over here, add it to the roster". main character energy fr fr 🌸


πŸŽ€ NAME πŸŽ€

memblock_add β€” add a new memblock region πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

int __init_memblock memblock_add (phys_addr_t base , phys_addr_t size );

πŸ’… ARGUMENTS πŸ’…

  • base β€” the base address of the new region, like where it starts, the whole starting point of the vibe ✨
  • size β€” how big the new region is πŸ“

🌈 DESCRIPTION 🌈

Adds a new memblock region [base, base + size) to the "memory" type. so it's a half-open interval, bestie, base is in and base + size is not in, that's just how it is πŸ’…

For mode details, go check out the description on memblock_add_range β€” that's where the real tea is πŸ«–


⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • -errno on failure 😭

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./mm/memblock.c, 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_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_is_region_reserved(9), memblock_free_all(9), reserve_mem_find_by_name(9), reserve_mem_release_by_name(9)

like... that's the whole squad, no cap 😀 go read them all, iykyk 🧚


and that's the page!! πŸ’œ this lil beauty ships from ./mm and it's dated October 2026 β€” mwah, iconic, periodt πŸŽ€βœ¨πŸ«Ά

πŸ“¦ where this page comes from