memblock_clear_kho_scratch(9)
π NAME π
memblock_clear_kho_scratch β okay so bestie, this one is literally just: clear the MEMBLOCK_KHO_SCRATCH flag for a specified region. That's it. That's the whole vibe. π
This page lives in the Kernel API Manual, and the function you're looking at is memblock_clear_kho_scratch(9). She's a little one, but she's iconic for what she does. β¨
πΈ SYNOPSIS πΈ
int memblock_clear_kho_scratch (phys_addr_t base , phys_addr_t size );
Return type is int, bestie β she gives you back a number, not a struct, not a pointer, just a whole int. Noted. π«Ά
π¦ ARGUMENTS π¦
baseβ the base phys addr of the region π so like, where the region starts in physical address space.sizeβ the size of the region πΈ like, how much of it there is.base+size= the region, iykyk.
β¨ RETURN β¨
0on success β slay! π-errnoon failure β not slay, but that's the deal. π
So the return is literally <green>0 on success, -errno on failure</green>. No cap. π
π SEE ALSO π
The kernel file for all of this is ./mm/memblock.c β that's the source of truth, the main character's house. π And here's the whole friend group, fr fr:
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)__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)
π‘ Notice how memblock_mark_kho_scratch(9) is right there in the list? Yeah β she's the sister function. This page is the "un-mark" girly. π§
That's the whole page, bestie!! Go clear that flag, get your 0, and live your truth. ππβ
Sign-off szn π β this one's from ./mm, dated October 2026, and the page is memblock_clear_kho_scratch(9). Mwah. ππ
π¦ 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