linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* debugging memory leaks in drivers/module
@ 2001-08-02  0:04 Rajeev Bector
  0 siblings, 0 replies; only message in thread
From: Rajeev Bector @ 2001-08-02  0:04 UTC (permalink / raw)
  To: linux kernel

Hi,
  I am thinking of creating a small patch
to track heap memory allocations and
deallocations from drivers and modules.
This could be really useful in a system
where you are testing lots of drivers 
and modules in your test environment and
want to keep track of how much kmalloc()ed
memory the module has allocated.

Has anyone written such a thing and it
is available for use somewhere ?

(Basically how it would work is I would
intercept the kmalloc() call in my routine
and then look at the __builtin_return_address
to find which module has requested the allocation)
Same with kfree() although I will have to dig
into the slab cache to figure out the original
request size. We can then record this info in 
a table of some sort and export it via /proc
or an ioctl()).. Is there a better way of
doing this ?

Thanks in advance !
Rajeev


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-02  0:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-02  0:04 debugging memory leaks in drivers/module Rajeev Bector

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).