kmemleak_no_scan(9)
π kmemleak_no_scan(9) π
okay so bestie, we're in the Kernel API Manual today and this page is called kmemleak_no_scan(9) β it's short, it's sweet, and it's lowkey doing the most important job in the whole leak-detector friend group. let's get into it β¨
πΈ NAME πΈ
kmemleak_no_scan β do not scan an allocated object π«Ά
like literally, that's the whole vibe. you're telling kmemleak to keep its little scanner hands off this object.
β¨ SYNOPSIS β¨
void __ref kmemleak_no_scan (const void *ptr );
that's it. one function, one argument, no cap. π
π ARGUMENTS π
ptrβ pointer to beginning of the object π ok so this is the pointer to the beginning of the object, bestie. the start. the head. not the middle, not the end β the beginning. note it. write it down. π
π¦ DESCRIPTION π¦
so basically this function notifies kmemleak not to scan the given memory block. π§ that's it, that's the tea.
it's useful in situations where it is known that the given object does not contain any references to other objects. like, we already know there's nothing in there pointing at anything else, so why waste the scanner's time? it's giving "nothing to see here, move along" energy. π
kmemleak will not scan such objects, which reduces the number of false negatives. and false negatives are the WORST β they're the leaks that hide from you and then show up later to ruin your whole week. π so yeah, this function is the friend who tells the scanner "skip this one, she's clean" and honestly? slay. π₯
π SEE ALSO π
go check out the kernel file ./mm/kmemleak.c β it's the main character of this whole saga, iykyk π
and then the whole kmemleak friend group, fr fr:
kmemleak_alloc(9)kmemleak_alloc_percpu(9)kmemleak_vmalloc(9)kmemleak_free(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_alloc_phys(9)kmemleak_free_part_phys(9)kmemleak_ignore_phys(9)
every single one of them made the list, no gatekeeping here π
bestie reminder: this page lives in the kernel tree at./mm, and it's dated October 2026. yes, the./mmdirectory. that's the source, that's the date, that's the whole footer energy β and honestly? iconic. ππ¦β
periodt. go forth and don't scan things you already know are empty. π β¨
π¦ 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