[lkml]   [1999]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: PATCH 2.3.26: kmalloc GFP_ZERO
    >>>>> "Jeff" == Jeff Garzik <> writes:

    Jeff> Attached is a patch against 2.3.26 which adds the GFP_ZERO flag.
    Jeff> There is a lot of code which does

    Jeff> ptr = kmalloc(size, ...); memset (ptr, 0, size);

    Jeff> This patch eliminates that second step. I didn't add it to
    Jeff> __kmem_cache_alloc because that routine was already complex
    Jeff> enough.

    By doing this you add another `if' clause to hot path code in the
    memory allocator, this is IMHO not a very good idea. Let the drivers
    which know they need zeroed memory, clear it out themselves.

    Putting it in kmem_cache_alloc would be even worse since it would
    defeat the entire idea of SLAB.


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

     \ /
      Last update: 2005-03-22 13:54    [W:0.020 / U:11.276 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site