[sr-dev] patch proposal - calloc
Daniel-Constantin Mierla
miconda at gmail.com
Sat Dec 22 14:51:23 CET 2012
Hello,
looking at the patch it seems that the new function does 'malloc' and
memset to zero of allocated space, am I right? If yes, this is different
that the standard calloc prototype/behaviour.
It is better to rename it to something else, to let the option open for
adding an alternative to standard 'calloc'. I would suggest for example
pkg_mallocz() -- ending z to indicate that the memory chunk is set to 0.
Also, and alternative has to be added for shm manager. Your patch is
only for pkg, but we have to keep the two coherent. There are some
components where the memory functions are provided as parameter, and, a
matter of need, they can be the ones for pkg or shm.
Cheers,
Daniel
On 12/21/12 10:32 PM, Konstantin M. wrote:
> Hello,
>
> Here is proposed patch for adding calloc to pkg_ memory manager.
>
>
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20121222/238d7f23/attachment.htm>
More information about the sr-dev
mailing list