gen_pool_first_fit(9)
๐ gen_pool_first_fit(9) ๐
okay so bestie, welcome to the Kernel API Manual โจ we're literally about to find the first available region of memory that matches the size requirement โ and ngl, there's no alignment constraint here, so it's giving chill vibes only ๐ซถ
๐ธ NAME ๐ธ
gen_pool_first_fit โ find the first available region of memory matching the size requirement (no alignment constraint) ๐
โจ SYNOPSIS โจ
unsigned long gen_pool_first_fit (unsigned long *map , unsigned long
size , unsigned long start , unsigned int nr , void *data , struct
gen_pool *pool , unsigned long start_addr );
๐ ARGUMENTS ๐
mapโ the address to base the search on ๐ like, this is where the hunt begins, bestiesizeโ the bitmap size in bits ๐งฎ yes, in bits, don't come for mestartโ the bitnumber to start searching at ๐ your starting line, your main character momentnrโ the number of zeroed bits we're looking for ๐ that's the actual size of the gap we wantdataโ additional data โ unused ๐ literally not used, she's just here for the vibespoolโ pool to find the fit region memory from ๐ the pool in question, the source of the memorystart_addrโ not used in this function ๐ nope, unused, don't @ me
๐ฆ SEE ALSO ๐ฆ
Kernel file ./lib/genalloc.c โ and the whole friend group ๐ซถ:
gen_pool_create(9), gen_pool_add_owner(9), gen_pool_virt_to_phys(9), gen_pool_destroy(9), gen_pool_alloc_algo_owner(9), gen_pool_dma_alloc(9), gen_pool_dma_alloc_algo(9), gen_pool_dma_alloc_align(9), gen_pool_dma_zalloc(9), gen_pool_dma_zalloc_algo(9), gen_pool_dma_zalloc_align(9), gen_pool_free_owner(9), gen_pool_for_each_chunk(9), gen_pool_has_addr(9), gen_pool_avail(9), gen_pool_size(9), gen_pool_set_algo(9), gen_pool_first_fit_align(9), gen_pool_fixed_alloc(9), gen_pool_first_fit_order_align(9), gen_pool_best_fit(9), gen_pool_get(9), devm_gen_pool_create(9), of_gen_pool_get(9)
fr fr, go read them, they're iconic ๐ฅ
okay that's the whole page, bestie, you ate that ๐
this little cutie came from ./lib, dated October 2026, and she answers to the name gen_pool_first_fit(9) ๐ bye bestie, love u, go allocate something 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