On 06/07/07, Bizhan Gholikhamseh (bgholikh) <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
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 [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to