Naughty naughts

COTTRELL at BRL.ARPA COTTRELL at BRL.ARPA
Fri Aug 9 05:01:43 AEST 1985


/* Doug Gwyn once wrote:
> By the way, I would discourage using calloc() unless you are allocating
> an array of (char)s and want them to all be NUL bytes.  Since calloc()
> cannot guess how you are intending to use the storage it allocates,
> it is unable to fill it with the "right" type of 0 data.  You will
> normally be better off using malloc() and initializing the storage
> yourself.

Huh? What other kind of zero is there? Don't mention weird beasts like
`tagged architectures' cuz then why would the arrays of chars be tagged
right? Or do the quotes around `right' mean to ignore the whole message?
I am no great fan of calloc over malloc however.

	jim		cottrell at nbs
*/
------



More information about the Comp.lang.c mailing list