[lkml]   [2005]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: -rc3 leaking NOT BIO [Was: Memory leak in 2.6.11-rc1?]

On Thu, 17 Feb 2005, Parag Warudkar wrote:
> A question - is it safe to assume it is a kmalloc based leak? (I am thinking
> of tracking it down by using kprobes to insert a probe into __kmalloc and
> record the stack to see what is causing so many allocations.)

It's definitely kmalloc-based, but you may not catch it in __kmalloc. The
"kmalloc()" function is actually an inline function which has some magic
compile-time code that statically determines when the size is constant and
can be turned into a direct call to "kmem_cache_alloc()" with the proper
cache descriptor.

So you'd need to either instrument kmem_cache_alloc() (and trigger on the
proper slab descriptor) or you would need to modify the kmalloc()
definition in <linux/slab.h> to not do the constant size optimization, at
which point you can instrument just __kmalloc() and avoid some of the

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-11-18 23:46    [W:0.105 / U:2.296 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site