Is malloc() or calloc() "better"?
Peter da Silva
peter at ficc.uu.net
Sun Jan 1 14:15:11 AEST 1989
In article <gables.416 at umigw.miami.edu>, slores%gables.span at umigw.miami.edu (Stanislaw L. Olejniczak) writes:
> It seems to me that most programmers, in giving examples here, use malloc()
> instead of calloc(). It seems to me that, with the headache I always get
> thinking of C strings, calloc would be a more common procedure. Would someone
> please enlighten me why is malloc so much more popular?
Kind of a waste to clear out the memory when you're just about to overwrite
it anyway.
--
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.
Work: uunet.uu.net!ficc!peter, peter at ficc.uu.net, +1 713 274 5180. `-_-'
Home: bigtex!texbell!sugar!peter, peter at sugar.uu.net. 'U`
Opinions may not represent the policies of FICC or the Xenix Support group.
More information about the Comp.lang.c
mailing list