Re: Tracing memory leaks (slabs) in 2.6.9+ kernels?

From: Justin Schoeman
Date: Thu Mar 03 2005 - 07:30:55 EST


OK - I have the patch working now, but there seems to be a flaw in the address reporting. When I look up the reported address in /proc/kallsyms, then look in the objdump of the module, the reported adress _does_not_ point to a call.

Am I missing something simple here?

Justin

Andrew Morton wrote:
Justin Schoeman <justin@xxxxxxxxxxxxxxx> wrote:

I am having a problem with memory leaking on a patched kernel. In order to pinpoint the leak, I would like to try to trace the allocation points for the memory.

I have found some vague references to patches that allow the user to dump the caller address for slab allocations, but I cannot find the patch itself.

Can anybody please point me in the right direction - either for that patch, or any other way to track down leaking slabs?



From: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>

With the patch applied,

echo "size-4096 0 0 0" > /proc/slabinfo

walks the objects in the size-4096 slab, printing out the calling address
of whoever allocated that object.

It is for leak detection.
...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/