FREE
Bjorn Engsig
bengsig at oracle.nl
Mon Mar 5 22:44:11 AEST 1990
Article <1990Mar2.152601.8000 at cubmol.bio.columbia.edu> by ping at cubmol.bio.columbia.edu (Shiping Zhang) says:
| Why is NOT calloc() made machine independent.
It's not a matter of machine dependence, but a matter of dependence of what
your program puts into the malloc'ed area. And since only integers are
sure to have all zero-bit zero's, only cases where you only put integers
into the malloc'ed area can be cleared with all-zeros, i.e. allocated by
a calloc call.
| Why is NOT malloc() made to initialize the contents automatically?
Why would you spend time on this, if you have to put data into the area anyway?
I believe this is by far the most common use.
--
Bjorn Engsig, Domain: bengsig at oracle.nl, bengsig at oracle.com
Path: uunet!mcsun!orcenl!bengsig
More information about the Comp.lang.c
mailing list