gen_pool_free_owner(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 pool
  • size β€” how big that memory is, in bytes
  • owner β€” the private data you stashed back at gen_pool_add time πŸ‘€

πŸ’– 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:


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