gen_pool_fir..._order_align(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– gen_pool_first_fit_order_align(9) πŸ’–

okay bestie, so this is a page from the Kernel API Manual β€” yes, the kernel, like the actual operating system guts β€” and it's about one little function that goes hunting for memory. 🧚✨


✨ NAME ✨

gen_pool_first_fit_order_align β€” finds the first available region of memory that matches the size requirement. and the region gets aligned to the order of the size you specified. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

unsigned long gen_pool_first_fit_order_align (unsigned long *map ,
unsigned long size , unsigned long start , unsigned int nr , void *data
, struct gen_pool *pool , unsigned long start_addr );

like, yes, that's a lot of arguments. no cap. we'll go through every single one, don't worry. 🫢


πŸ‘‘ ARGUMENTS πŸ‘‘

  • map β€” the address to base the search on. your starting point, your map, your little treasure hunt map. πŸ—ΊοΈ
  • size β€” the bitmap size, measured in bits. that's the size of the whole bitmap we're scanning, not the thing you're looking for.
  • start β€” the bitnumber to start searching at. like starting your scroll at a specific point instead of the top. πŸ’…
  • nr β€” the number of zeroed bits we're looking for. this is literally the size requirement in bits, the amount of free space your heart desires. πŸ’€
  • data β€” additional data. and it's unused here. ghosted. πŸ™ˆ
  • pool β€” the pool to find the fit region memory from. this is where the memory actually lives. 🏠
  • start_addr β€” not used in this function. also ghosted. two for two. 😭

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./lib/genalloc.c β€” and like, the whole genpool family reunion:

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(9), gen_pool_first_fit_align(9), gen_pool_fixed_alloc(9), gen_pool_best_fit(9), gen_pool_get(9), devm_gen_pool_create(9), of_gen_pool_get(9)


and that's the whole page, bestie!! πŸ¦‹ it's from ./lib, dated October 2026, and yes the header on this one is literally gen_pool_fir..._order_align(9) because apparently even man pages gotta abbreviate when the function name gets too iconic to fit. πŸ’…βœ¨ periodt.

πŸ“¦ where this page comes from