lkml.org 
[lkml]   [2008]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH 03/15] kmemleak: Add the slab memory allocation/freeing hooks
    From
    Date
    On Wed, 2008-12-10 at 18:27 +0000, Catalin Marinas wrote:
    > @@ -3195,6 +3203,8 @@ static inline void *____cache_alloc(struct
    > kmem_cache *cachep, gfp_t flags)
    > STATS_INC_ALLOCMISS(cachep);
    > objp = cache_alloc_refill(cachep, flags);
    > }
    > + /* avoid false negatives */
    > + memleak_erase(&ac->entry[ac->avail]);
    > return objp;
    > }

    It would be really nice here to say *how* it is avoiding false
    negatives. :)

    How about:

    /* Don't let the pointer from the slab itself count as referencing */

    -- Dave


    \
     
     \ /
      Last update: 2008-12-10 19:55    [W:0.022 / U:34.860 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site