lkml.org 
[lkml]   [2012]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC v2] slab: introduce kmalloc_array
From
Date
On Feb 10, 2012, at 8:11 AM, Alexey Dobriyan wrote:
>> It should be named kaalloc(), I think.

I like this shorter name. Let's see what others think. ;-)

>> Why it is ULONG_MAX, when size_t is used?

Is there a SIZE_MAX or something similar?

> Also, it could be written more "robust" against people who will make
> sizeof() the first argument with __builtin_constant_p().

Do you mean something like this?

BUILD_BUG_ON(__builtin_constant_p(n));

or

BUILD_BUG_ON(__builtin_constant_p(n) && !__builtin_constant_p(size));

- xi


\
 
 \ /
  Last update: 2012-02-10 14:57    [W:0.058 / U:22.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site