lkml.org 
[lkml]   [2012]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: Uninline kcalloc
    From
    On Tue, 14 Feb 2012, Pekka Enberg wrote:
    >> Me neither. I don't think Christoph's SAFE_ARRAY_SIZE() suggestion
    >> makes much sense, really. It's more verbose, less obvious API, and
    >> doesn't really deal with the overflow case cleanly.

    On Tue, Feb 14, 2012 at 11:09 PM, Christoph Lameter <cl@linux.com> wrote:
    > IMHO Having a function to deal with the overflow of a multiplication and
    > then do an allocation based on the result is a conflation of two different
    > things that need to be separate. kcalloc only exists because there is
    > an ancient user space function that somehow got a second parameter instead
    > of just using the same as malloc().

    It's an ancient userspace function that everybody knows how to use.
    There really isn't big enough gains from SAFE_ARRAY_SIZE() to justify
    a new API. And it's not as if the macro is an elegant way to solve the
    problem at hand either.

    Pekka


    \
     
     \ /
      Last update: 2012-02-14 22:33    [W:0.028 / U:29.340 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site