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 !
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Aug 07 2001 - 21:00:14 EST