lkml.org 
[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
From
Date
On Feb 14, 2012, at 2:20 AM, Dan Carpenter wrote:
> 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().

I don't think the BUILD_BUG_ON macro is useful here nor in kcalloc
(besides gcc won't give you much handy information).

Just matching the new non-zeroing array allocator with kcalloc seems
like the right thing to do. We had quite a few patches that could
be simpler with it. For now I don't feel like it's necessary to
change the API (e.g., making gfp_t as the first argument), do "smart"
optimizations (e.g., recognizing the first argument is a constant),
nor add more allocators (e.g., to match vmalloc, kmalloc_node).

- xi


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