Re: how to detect memory leak in kernel module

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

 



On 06/07/07, Bizhan Gholikhamseh (bgholikh) <bgholikh@xxxxxxxxx> wrote:

Hi,
How do i detect memory leak in the kernel module?

1. Read the code and make sure that all resources you allocate are
always freed properly.
2. Run the module and observe if it leaks over time.
3. Perhaps wrap your memory allocation and freeing in a wrapper
function that keeps track of how much your module has allocated and
freed and prints statistics that you can then check regularly.

I believe nr 1 is the most common approach.

--
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

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