[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3F3C1079-91B3-4AD4-97ED-EACAD3CB085F@gmail.com>
Date: Fri, 10 Feb 2012 08:55:02 -0500
From: Xi Wang <xi.wang@...il.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: Jens Axboe <axboe@...nel.dk>, Pekka Enberg <penberg@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Dan Carpenter <dan.carpenter@...cle.com>,
linux-kernel@...r.kernel.org, Christoph Lameter <cl@...ux.com>,
Matt Mackall <mpm@...enic.com>,
David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH RFC v2] slab: introduce kmalloc_array
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists