Re: Question on Memory Leaks in Module

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

 



Hi...

On Jan 23, 2008 4:00 PM, sahlot arvind <asahlot@xxxxxxxxx> wrote:
> I have written a simple LKM. I just want to test whether there is a memory
> leak in the module or not?
>
> Could any body suggest me how to test the memory leakage in LKM?

Hard to say. You mean, i.e you did kmalloc() inside kernel module then
later you want to know is it forgotten to be kfree()-ed?

In that case, I say it's hard because AFAIK kmalloc()-ed pages isn't
assigned to certain process address space. Even if it's assigned to a
process address space, you still need something like valgrind to know
whether something is leaked or not. Unfortunately valgrind can only do
that in user space.

Linux-mm folks should provide you better explanation.

regards,

Mulyadi

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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