[lkml]   [2012]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH RFC v2] slab: introduce kmalloc_array
    On Tue, 14 Feb 2012, Dan Carpenter wrote:
    > SAFE_ARRAY_SIZE() would return the size if there were no overflow
    > and -1 on errors? We can't return zero on errors because there are
    > a lot of places which do zero size allocations and it's valid. It
    > seems ugly.
    > I really think that's over thinking things. Let's just match
    > kcalloc() exactly except without zeroing. The BUILD_BUG_ON() thing
    > is an over complication as well. We haven't needed it for
    > kcalloc().

    It is and we're not going to phase out a userspace-like kcalloc() API with
    something as verbose as SAFE_ARRAY_SIZE().


     \ /
      Last update: 2012-02-14 08:37    [W:0.019 / U:10.336 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site