RE: how to detect memory leak in kernel module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>How do i detect memory leak in the kernel module?

You can do it yourself.

 

Make a wrapper above kmalloc/ kfree.

There  you maintain the allocator’s info ( line, file, number of bytes) and also maintain a count .

In free wrapper ( decrement the count)

 

In module cleanup function if count is non zero then there is a leak and to see the leak dump the allocator info table.

-Nilanjan

 

 


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux