Re: [PATCH] kernel: use kcalloc instead kmalloc/memset

From: Andrew Morton
Date: Fri Aug 05 2005 - 01:39:04 EST


Pekka J Enberg <penberg@xxxxxxxxxxxxxx> wrote:
>
> [PATCH] use kzalloc instead of kmalloc/memset
>

dammit, I was hoping for akpmalloc()

>
> +static inline void *kzalloc(size_t size, unsigned int __nocast flags)
> +{
> + return kcalloc(1, size, flags);
> +}
> +

That'll generate just as much code as simply using kcalloc(1, ...). This
function should be out-of-line and EXPORT_SYMBOL()ed. And kcalloc() can
call it too..

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/