Messages in this thread | | | Date | Wed, 9 Jun 2004 11:34:55 -0700 | From | Chris Wright <> | Subject | Re: [PATCH] ALSA: Remove subsystem-specific malloc (1/8) |
| |
* Pekka J Enberg (penberg@cs.helsinki.fi) 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |