diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2006-03-25 14:06:43 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 19:22:49 +0300 |
commit | 40c07ae8daa659b8feb149c84731629386873c16 (patch) | |
tree | 77d9e7572135de30f184103cc6dd36f9c0f8dfbf /mm/util.c | |
parent | a8c0f9a41f88da703ade33f9c1626a55c786e8bb (diff) | |
download | linux-40c07ae8daa659b8feb149c84731629386873c16.tar.xz |
[PATCH] slab: optimize constant-size kzalloc calls
As suggested by Eric Dumazet, optimize kzalloc() calls that pass a
compile-time constant size. Please note that the patch increases kernel
text slightly (~200 bytes for defconfig on x86).
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/util.c')
-rw-r--r-- | mm/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/util.c b/mm/util.c index b68d3d7d0359..7368479220b3 100644 --- a/mm/util.c +++ b/mm/util.c @@ -5,18 +5,18 @@ #include <asm/uaccess.h> /** - * kzalloc - allocate memory. The memory is set to zero. + * __kzalloc - allocate memory. The memory is set to zero. * @size: how many bytes of memory are required. * @flags: the type of memory to allocate. */ -void *kzalloc(size_t size, gfp_t flags) +void *__kzalloc(size_t size, gfp_t flags) { void *ret = ____kmalloc(size, flags); if (ret) memset(ret, 0, size); return ret; } -EXPORT_SYMBOL(kzalloc); +EXPORT_SYMBOL(__kzalloc); /* * kstrdup - allocate space for and copy an existing string |