Re: [PATCH] ALSA: Remove subsystem-specific malloc (1/8)

From: Chris Wright
Date: Wed Jun 09 2004 - 13:37:29 EST


* Pekka J Enberg (penberg@xxxxxxxxxxxxxx) wrote:
> /**
> + * kcalloc - allocate memory. The memory is set to zero.
> + * @size: how many bytes of memory are required.
> + * @flags: the type of memory to allocate.
> + */
> +void *kcalloc(size_t size, int flags)
> +{
> + void *ret = kmalloc(size, flags);
> + if (ret)
> + memset(ret, 0, size);
> + return ret;
> +}

This looks more like the kzalloc() that pops up every now and then.
Wouldn't it make more sense to give kcalloc() a true calloc() style
interface?

thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
-
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/