kmemleak_free_percpu(9)
π 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__percpupointer 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 πβ¨
kmemleak_alloc(9)kmemleak_alloc_percpu(9)kmemleak_vmalloc(9)kmemleak_free(9)kmemleak_free_part(9)kmemleak_update_trace(9)kmemleak_not_leak(9)kmemleak_transient_leak(9)kmemleak_ignore_percpu(9)kmemleak_ignore(9)kmemleak_scan_area(9)kmemleak_no_scan(9)kmemleak_alloc_phys(9)kmemleak_free_part_phys(9)kmemleak_ignore_phys(9)
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
- 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