Re: [PATCH 2.6.17-rc4 1/6] Base support for kmemleak

From: Ingo Molnar
Date: Fri May 26 2006 - 07:30:07 EST



* Andi Kleen <ak@xxxxxxx> wrote:

> > Also, kmemleak guarantees (assuming the implementation is correct)
> > that if a leak happens in practice, it will be detected immediately.
>
> Not if the slab object is reused quickly - which it often is.

I dont see how slab object reuse could cause leak detection problems -
if something _is_ being freed, it's not a leak. What matters are the
objects that are 'forgotten' - and (at least statistically) kmemleak
should find them, because after some time all references to them go
away.

on 64-bit systems the statistical likelyhood of finding a leak could be
even increased by artificially relocating the kernel to a semi-random
base within the 64-bit address space. (that would mean that in practice
that all kernel pointers would be 'marked' with the top 28-32 bits that
are a good indicator of them being a kernel pointer)

Ingo
-
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/