[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0804290956360.10847@schroedinger.engr.sgi.com>
Date: Tue, 29 Apr 2008 09:58:35 -0700 (PDT)
From: Christoph Lameter <clameter@....com>
To: Pekka Enberg <penberg@...helsinki.fi>
cc: sancelot@...e.fr, linux-kernel@...r.kernel.org
Subject: Re: detecting kernel mem leak
On Tue, 29 Apr 2008, Pekka Enberg wrote:
> or use a tool such as slabtop to see where the memory is going. If the
> memory is being leaked in the kmalloc caches, you can use
> CONFIG_DEBUG_SLAB_LEAK which part of the kernel is doing all those
> allocations (not really suitable for production machines).
For slub: Just enable debugging and then do a cat on
/sys/kernel/slab/<cachename>/allocs or frees to see where memory is
allocated or freed.
> Christoph, I suppose there's some option to
> Documentation/vm/slabinfo.c that provides similar output to
> CONFIG_DEBUG_SLAB_LEAK for SLUB?
If you run a report on a slabcache with f.e.
slabinfo kmalloc-2048
and debugging is enabled then all functions that allocate and free objects
in kmalloc-2048 are listed.
Just doing
slabinfo
list all caches with the number of objects allocated.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists