Welcome! Log In Create A New Profile

Advanced

Running memory leak test - Help me!

Posted by neolaser 
Running memory leak test - Help me!
September 10, 2008 01:15AM
I have written a program that runs as a loadable kernel module. I would like to do a memory leak test on it. So how can I find the memory used by this module ?

Is there any means to check the memory usage after the init of a module and just before doing rmmod?

Thanks in Advance
neolaser
Re: Running memory leak test - Help me!
September 29, 2008 01:14PM
Hi!

I do not know any way to account the memory usage of a module (and I doubt there is a way which does not involve turning the memory subsystem upside down). However, you can do the following:

cat /proc/meminfo
cat /proc/slabinfo
slabtop

(the last 2 require the use of the "slab" allocator - they will not run with the "slub" allocator)

---
programing a layer 3+4 network protocol for mesh networks
see [michaelblizek.twilightparadox.com]
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 5 plus 2?
Message: