mas_prealloc_calc(9)
π mas_prealloc_calc(9) β the Kernel API Manual glow-up β¨
okay bestie, so this is a page from the Kernel API Manual and it's literally all about mas_prealloc_calc β yes the manual name is baked in, we're not copying the header line, that's just where we live now π«Ά
πΈ NAME πΈ
mas_prealloc_calc β the little function that does the math and tells you how many nodes you need for a given store operation. that's it. that's the whole vibe. she's a calculator with main character energy π
β¨ SYNOPSIS β¨
void mas_prealloc_calc (struct ma_wr_state *wr_mas , void *entry );
no cap, that's the exact signature, keep it in your notes π
π ARGUMENTS π
wr_masβ The maple write state. she's the whole situation, the context, the lore πentryβ The entry to store into the tree. like, the actual thing you're putting in there, iconic π
π RETURN π
Number of nodes required for preallocation. that's the number she hands you back β do with it what you will, queen π₯
π¦ SEE ALSO π¦
the squad. the whole group chat. all of them live in the kernel file ./lib/maple_tree.c, and here's the full roster, no one left behind (i would NEVER) π
mas_wr_preallocate(9)mas_insert(9)mas_alloc_cyclic(9)mas_walk(9)mte_dead_walk(9)mt_free_walk(9)mas_store(9)mas_store_gfp(9)mas_store_prealloc(9)mas_preallocate(9)mas_next(9)mas_next_range(9)mt_next(9)mas_prev(9)mas_prev_range(9)mt_prev(9)mas_pause(9)mas_find_setup(9)mas_find(9)mas_find_range(9)mas_find_rev_setup(9)mas_find_rev(9)mas_find_range_rev(9)mas_erase(9)mas_nomem(9)mas_nomem_nofail(9)mtree_load(9)mtree_store_range(9)mtree_store(9)mtree_insert_range(9)mtree_insert(9)mtree_alloc_cyclic(9)mtree_erase(9)__mt_dup(9)mtree_dup(9)__mt_destroy(9)mtree_destroy(9)mt_find(9)mt_find_after(9)
and that's the page, bestie π§ ok one last thing before you go β this whole thing ships out of ./lib and it's dated October 2026, so likeβ¦ future-coded fr fr β mwah, go preallocate 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