kmemleak_scan_area(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” kmalloc flags 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 🫢:

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