kmemleak_scan_area(9)
π kmemleak_scan_area π
okay bestie, so this one is a kernel API manual page β literally the kmemleak_scan_area(9) page, and it's about teaching kmemleak to stop snooping through every byte of your object and only look where it actually matters. it's giving "targeted searching" energy fr fr π―
β¨ NAME β¨
kmemleak_scan_area β limit the range to be scanned in an allocated object π
so like. you're telling kmemleak "hey girl, only scan this part of the object, not the whole thing." iconic behavior honestly.
πΈ SYNOPSIS πΈ
void __ref kmemleak_scan_area (const void *ptr , size_t size , gfp_t gfp );
look at her go π
three arguments, one void return, __ref sitting right there in the middle like it owns the place.
π¦ ARGUMENTS π¦
ptrβ pointer to the beginning or inside the object. this also represents the start of the scan area. so yes, it can point into the middle of things, she's flexible like that π«Άsizeβ size of the scan area. how much of it are we actually scanning? this is the number.gfpβkmallocflags used for kmemleak internal memory allocations. like, the flags kmemleak itself uses when it's doing its own little bookkeeping.
π DESCRIPTION π
okay so here's the vibe check π β you use this function when you know that only certain parts of an object contain references to other objects. like, why scan the whole thing when you already know where the pointers live?
Kmemleak will only scan these areas, which reduces the number of false negatives. periodt. that's the whole win β fewer false negatives, less pointless scanning πβ¨
ngl it's basically a "girl, don't look there, look here" for the memory leak detector π
β SEE ALSO β
Kernel file ./mm/kmemleak.c β that's where the magic lives, bestie π§
and the whole kmemleak friend group π«Ά:
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_no_scan(9)kmemleak_alloc_phys(9)kmemleak_free_part_phys(9)kmemleak_ignore_phys(9)
like, the whole squad is here. so many functions. all of them useful. slay π
okay that's the page bestie!! and before you go β this one came from ./mm, dated October 2026, and the page itself is kmemleak_scan_area(9). mwah, go reduce some false negatives πππ
π¦ 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