Re: memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 29, 2003 at 06:31:40PM +0200, Adam ENDRODI wrote:
> What is the usual techinque to trace down memory leaks in the
> kernel?  I've introduced a few reference counted objects, but
> some hours of regression testing always results in OOM.  Also,

Debugging messages and more debugging messages. And since you should be
allocating from (specific) kmem caches, you should also watch these.
(statistics is available via /proc and you can always make it print
a debugging message)

> since I use UML for development purposes, I'm wondering if
> a bug in it (version 2.4.20-2) could cause the problem.

I doubt that. The uml patches are not that intrusive.

It actually makes debugging a lot easier, because you can inspect it
with gdb. You can also write logs to file on the host (because you can
make host syscalls in uml kernel mode). You could create a (huge) log
of ref-counting operations and key checkpoints and use some text
processing tool (awk, perl...) to search for mis-matches.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux