kmemleak_free_percpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– kmemleak_free_percpu πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ this one's a lil function from the kernel's memory-leak detective squad, and honestly? she's short but she matters. πŸŽ€


🌸 NAME 🌸

kmemleak_free_percpu β€” unregister a previously registered __percpu object 🧚

like, you know how you have to tell kmemleak when you make something? yeah, this is the breakup text for when it's gone. πŸ’…


✨ SYNOPSIS ✨

void __ref kmemleak_free_percpu (const void __percpu *ptr );

that's it. that's the whole vibe check. one pointer in, nothing out, void queen πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ptr β€” the __percpu pointer to the beginning of the object 🫢 fr fr, it's gotta point at the start, not somewhere in the middle β€” she's not doing the extra math for you.

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• β€” this function gets called from the kernel percpu allocator whenever an object (a memory block, bestie, actual memory) is freed, specifically by free_percpu. πŸ’€

basically: when percpu memory dips out, kmemleak gets the memo so it doesn't sit there accusing your code of a leak that isn't even real. iconic behaviour, no notes. πŸ‘‘


🌈 SEE ALSO 🌈

Kernel file ./mm/kmemleak.c β€” go read the source if you're feeling main character energy today πŸ“–βœ¨

the whole kmemleak friend group, assembled πŸ«ΆπŸ’œ


and that's the page, bestie!! πŸ’– brought to you by ./mm, dated October 2026, and yes the header said kmemleak_free_percpu(9) the whole time β€” slay, go free some percpu memory responsibly πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from