gen_pool_first_fit(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’– 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, bestie
  • size โ€” the bitmap size in bits ๐Ÿงฎ yes, in bits, don't come for me
  • start โ€” the bitnumber to start searching at ๐Ÿ your starting line, your main character moment
  • nr โ€” the number of zeroed bits we're looking for ๐ŸŒˆ that's the actual size of the gap we want
  • data โ€” additional data โ€” unused ๐Ÿ™ˆ literally not used, she's just here for the vibes
  • pool โ€” pool to find the fit region memory from ๐Ÿ‘‘ the pool in question, the source of the memory
  • start_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