What is kmemleak_alloc used for?

Daniel Baluta daniel.baluta at gmail.com
Sun Apr 19 04:43:04 EDT 2015


On Sun, Apr 19, 2015 at 11:36 AM, yoma sophian <sophian.yoma at gmail.com> wrote:
> hi all:
> I found in alloc_bootmem_bdata, kmem_cache_alloc, kmalloc, vmalloc,
> they will call kmemleak_alloc.
>
> Would anyone know why we have to do so for calling kmemleak_alloc at
> different places?

AFAIK this is used for accounting allocated memory in order to easily track
down memory leaks.

It is implemented by the kmemleak detector.

thanks,
Daniel.



More information about the Kernelnewbies mailing list