Re: Question on Memory Leaks in Module

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

 



Le Wed, 23 Jan 2008 14:30:40 +0530,
"sahlot arvind" <asahlot@xxxxxxxxx> a écrit :

> I have written a simple LKM. I just want to test whether there is a
> memory leak in the module or not?

The best way is to read your code, and let others review your code. If
the design is correct and simple, then it should be fairly obvious that
there isn't any leak.

> Could any body suggest me how to test the memory leakage in LKM?

Catalin Marinas worked on a kernel leak detector a while ago, but as
far as I know, it hasn't been included in the kernel. You can learn
more about it at http://www.procode.org/kmemleak/ and
http://lwn.net/Articles/187979/.

However, by reading lib/Kconfig.debug, I just discovered the
CONFIG_SLAB_LEAK option, which seems to indicate that there is some
sort of leak detector for the slab allocator, but I've never tried it.

Sincerly,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Free Embedded Linux Training Materials
on http://free-electrons.com/training
(More than 1500 pages!)

Attachment: signature.asc
Description: PGP signature


[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