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

Ingo Molnar
2006-05-26T11:30:49Z

* Andi Kleen <ak@suse.de> 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