kmemleak_free(9)
π kmemleak_free(9) β the kernel API glow-up π
okay so bestie, welcome to kmemleak_free(9), the Kernel API Manual page that's lowkey the exit to kmemleak's entrance. Every alloc needs its free, and this is the diva doing the un-registering. Slay.
β¨ SYNOPSIS β¨
void __ref kmemleak_free (const void *ptr );
that's it. that's the whole flex. no cap. π
πΈ ARGUMENTS πΈ
ptrβ pointer to beginning of the object. yes bestie, beginning β not the middle, not "eh somewhere around there". the start. the main character coordinate. π«Ά
π¦ DESCRIPTION π¦
so the way that this works is: this function gets called from the kernel allocators when an object (a memory block) is freed β like when kmem_cache_free, kfree, vfree etc. do their thing. it's literally kmemleak going "okay she's gone, un-register her" so the leak detector doesn't keep side-eyeing a block that's already left the chat. πβ¨
it's the cleanup bestie. the goodbye text. the unmatched energy of a properly freed pointer. do not skip her. π§
π₯ SEE ALSO π₯
the whole kmemleak friend group, plus where they hang out:
- Kernel file
./mm/kmemleak.c kmemleak_alloc(9)kmemleak_alloc_percpu(9)kmemleak_vmalloc(9)kmemleak_free_part(9)kmemleak_free_percpu(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)
likeβ¦ the whole roster. iykyk. π
sign-off time π β this lil masterpiece lives in ./mm, dated October 2026, and it's giving iconic kernel documentation energy fr fr. mwah ππ
π¦ 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