gen_pool_free_owner(9)
π gen_pool_free_owner β from the Kernel API Manual, bestie
Okay so real talk, this page lives in section 9 of the Kernel API Manual and it's about giving back your special memory to the pool you borrowed it from. Like returning a borrowed hoodie but make it β¨kernelβ¨.
πΈ NAME
gen_pool_free_owner β free allocated special memory back to the pool
Literally what it says on the tin. You allocated, now you free. Balance. Periodt.
π SYNOPSIS
void gen_pool_free_owner (struct gen_pool *pool , unsigned long addr ,
size_t size , void **owner );
Four args, no return value, void as always β she does her job and doesn't need to report back. Iconic behaviour honestly.
π¦ ARGUMENTS
poolβ the pool you're freeing to π«Ά (the one you borrowed from, don't get cute and mix them up)addrβ starting address of the memory you're handing back to the poolsizeβ how big that memory is, in bytesownerβ the private data you stashed back atgen_pool_addtime π
π DESCRIPTION
So basically: this frees previously allocated special memory back to the pool you specify. That's the whole vibe.
β οΈ But bestie listen to me β this can not be used in an NMI handler on architectures without an NMI-safe cmpxchg implementation. Not a suggestion, not a vibe check fail, it's just a no. π
β¨ SEE ALSO
Kernel file ./lib/genalloc.c plus 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_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_first_fit_order_align(9)gen_pool_best_fit(9)gen_pool_get(9)devm_gen_pool_create(9)of_gen_pool_get(9)
That's the whole page, ngl. Go free your memory responsibly π β this little love letter came from ./lib, dated October 2026, and it's signed gen_pool_free_owner(9) like the main character she is. πβ¨
π¦ 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