mempool_destroy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– mempool_destroy(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ this is the page for mempool_destroy, and yes it's exactly the little cleanup queen you think it is πŸ§ΉπŸ’…


🌸 NAME 🌸

mempool_destroy β€” deallocate a memory pool 🫢


✨ SYNOPSIS ✨

void mempool_destroy (struct mempool *pool );

πŸŽ€ ARGUMENTS πŸŽ€

  • pool β€” pointer to the memory pool which was allocated via mempool_create. like, the pool has to be one that came from mempool_create, okay? don't be out here handing it random pointers πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

Free all reserved elements in pool and pool itself. that's it, that's the whole vibe β€” everything inside goes, and then the pool goes too πŸ¦‹

and about the sleeping thing: this function only sleeps if the free_fn function sleeps. no cap. so if your free_fn is a sleepy little thing, then yeah, this call might nap too 😴 otherwise it's not out here catching Zs on its own.

ngl this is the "and scene" moment for your pool β€” it frees the reserved elements and the pool itself, so don't go touching pool afterwards, bestie 😭

🌈 SEE ALSO 🌈

kernel file ./mm/mempool.c πŸ‘‘ and the whole friend group:


okay bye bestie, go free that pool responsibly 🫢✨ this page came from ./mm, dated October 2026, and it is mempool_destroy(9) β€” periodt πŸ’…πŸŽ€

πŸ“¦ where this page comes from