Re: Question on Memory Leaks in Module

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

 



Hi,

So If i do a kzalloc() in my module and then unload my module without
freeing it, it will be a memory leak...........Am i right ?? .. Or the
kernel is intelligent enough to check and free those memory buffers
during unload of the module ?

Thanks in advance

On Jan 23, 2008 6:24 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
> 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
>
>



-- 
Thanks & Regards,
********************************************
Manish Katiyar  ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************

--
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