public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How to check for memory leaks
@ 2008-12-08 22:18 Larry Finger
  2008-12-08 22:33 ` Frédéric Weisbecker
  2008-12-09  8:55 ` Hinko Kocevar
  0 siblings, 2 replies; 6+ messages in thread
From: Larry Finger @ 2008-12-08 22:18 UTC (permalink / raw)
  To: LKML

What is the best way to check if there is a memory leak?

If I start a ping running on my system using the rtl8187 driver, and nothing
else active on my system, I see an increase in the "slab" value in /proc/meminfo
of about 65 kB/minute. Is this indicative of a memory leak? When I run the same
test with p54usb, the increase is only 20 kB/min.

Thanks,

Larry


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to check for memory leaks
  2008-12-08 22:18 How to check for memory leaks Larry Finger
@ 2008-12-08 22:33 ` Frédéric Weisbecker
  2008-12-09  1:38   ` J.R. Mauro
  2008-12-09  1:49   ` Larry Finger
  2008-12-09  8:55 ` Hinko Kocevar
  1 sibling, 2 replies; 6+ messages in thread
From: Frédéric Weisbecker @ 2008-12-08 22:33 UTC (permalink / raw)
  To: Larry Finger; +Cc: LKML

2008/12/8 Larry Finger <Larry.Finger@lwfinger.net>:
> What is the best way to check if there is a memory leak?
>
> If I start a ping running on my system using the rtl8187 driver, and nothing
> else active on my system, I see an increase in the "slab" value in /proc/meminfo
> of about 65 kB/minute. Is this indicative of a memory leak? When I run the same
> test with p54usb, the increase is only 20 kB/min.
>
> Thanks,
>
> Larry


Hi,

You could have a look on kmemleak: http://www.procode.org/kmemleak/
It's up to date version is on the arm development git branch (topic kmemleak):
http://www.linux-arm.org/git?p=linux-2.6.git;a=summary

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to check for memory leaks
  2008-12-08 22:33 ` Frédéric Weisbecker
@ 2008-12-09  1:38   ` J.R. Mauro
  2008-12-09  1:45     ` Larry Finger
  2008-12-09  1:49   ` Larry Finger
  1 sibling, 1 reply; 6+ messages in thread
From: J.R. Mauro @ 2008-12-09  1:38 UTC (permalink / raw)
  To: Frédéric Weisbecker; +Cc: Larry Finger, LKML

On Mon, Dec 8, 2008 at 5:33 PM, Frédéric Weisbecker <fweisbec@gmail.com> wrote:
> 2008/12/8 Larry Finger <Larry.Finger@lwfinger.net>:
>> What is the best way to check if there is a memory leak?
>>
>> If I start a ping running on my system using the rtl8187 driver, and nothing

Is this the driver in the staging tree or a different one?

>> else active on my system, I see an increase in the "slab" value in /proc/meminfo
>> of about 65 kB/minute. Is this indicative of a memory leak? When I run the same
>> test with p54usb, the increase is only 20 kB/min.
>>
>> Thanks,
>>
>> Larry
>
>
> Hi,
>
> You could have a look on kmemleak: http://www.procode.org/kmemleak/
> It's up to date version is on the arm development git branch (topic kmemleak):
> http://www.linux-arm.org/git?p=linux-2.6.git;a=summary
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to check for memory leaks
  2008-12-09  1:38   ` J.R. Mauro
@ 2008-12-09  1:45     ` Larry Finger
  0 siblings, 0 replies; 6+ messages in thread
From: Larry Finger @ 2008-12-09  1:45 UTC (permalink / raw)
  To: J.R. Mauro; +Cc: Frédéric Weisbecker, LKML

J.R. Mauro wrote:
> 
> Is this the driver in the staging tree or a different one?

This is the driver in wireless-testing, which is essentially the same as the one
in mainline.

Larry


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to check for memory leaks
  2008-12-08 22:33 ` Frédéric Weisbecker
  2008-12-09  1:38   ` J.R. Mauro
@ 2008-12-09  1:49   ` Larry Finger
  1 sibling, 0 replies; 6+ messages in thread
From: Larry Finger @ 2008-12-09  1:49 UTC (permalink / raw)
  To: Frédéric Weisbecker; +Cc: LKML

Frédéric Weisbecker wrote:
> 
> You could have a look on kmemleak: http://www.procode.org/kmemleak/
> It's up to date version is on the arm development git branch (topic kmemleak):
> http://www.linux-arm.org/git?p=linux-2.6.git;a=summary
> 

I downloaded the git tree, but x86_64 architecture won't build in the kmemtest
branch. I've built an i386 kernel that I will install on a different machine.
Once I get that working, I'll try to fix the other problem and post a patch.

Larry


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to check for memory leaks
  2008-12-08 22:18 How to check for memory leaks Larry Finger
  2008-12-08 22:33 ` Frédéric Weisbecker
@ 2008-12-09  8:55 ` Hinko Kocevar
  1 sibling, 0 replies; 6+ messages in thread
From: Hinko Kocevar @ 2008-12-09  8:55 UTC (permalink / raw)
  To: Larry Finger; +Cc: LKML

Larry Finger wrote:
> What is the best way to check if there is a memory leak?
> 
> If I start a ping running on my system using the rtl8187 driver, and nothing
> else active on my system, I see an increase in the "slab" value in /proc/meminfo
> of about 65 kB/minute. Is this indicative of a memory leak? When I run the same
> test with p54usb, the increase is only 20 kB/min.
> 

Also see cat /proc/slabinfo (you need to compile some debugging feature to get access to 
/proc/slabinfo).

HTTH,
Hinko

-- 
Hinko Kočevar, OSS developer
ČETRTA POT, d.o.o.
Planina 3, 4000 Kranj, SI EU
tel     ++386 (0) 4 280 66 03
e-mail  hinko.kocevar@cetrtapot.si
http    www.cetrtapot.si


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-12-09  9:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-08 22:18 How to check for memory leaks Larry Finger
2008-12-08 22:33 ` Frédéric Weisbecker
2008-12-09  1:38   ` J.R. Mauro
2008-12-09  1:45     ` Larry Finger
2008-12-09  1:49   ` Larry Finger
2008-12-09  8:55 ` Hinko Kocevar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox