lkml.org 
[lkml]   [2008]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/15] kmemleak: Add the slab memory allocation/freeing hooks
On Thu, 18 Dec 2008, Catalin Marinas wrote:

> In the ____cache_alloc() kmemleak clears the
> cachep->array->entry[ac->avail] pointer but this may not be enough as
> freed and later re-allocated objects may have pointers in the alien
> cache (is that correct?). A better approach (haven't tried it yet) would
> be not to scan objects allocated via alloc_arraycache() at all. However,
> there is still the initarray_cache/generic which are automatically
> scanned via the data section (unless I add an attribute to place them in
> a different, not scanned, section).

An allocated object is not part of any cache in SLAB. Only freed objects
are kept in the slab queues. A freed object can only be in one queue at a
time.



\
 
 \ /
  Last update: 2008-12-18 17:51    [W:0.235 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site