mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rajeev Bector <rajeev_bector@yahoo.com>
To: linux kernel <linux-kernel@vger.kernel.org>
Subject: debugging memory leaks in drivers/module
Date: Wed, 1 Aug 2001 17:04:40 -0700 (PDT)	[thread overview]
Message-ID: <20010802000441.95526.qmail@web14408.mail.yahoo.com> (raw)

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/

                 reply	other threads:[~2001-08-02  0:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010802000441.95526.qmail@web14408.mail.yahoo.com \
    --to=rajeev_bector@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®