Re:Why does calloc exist?
by joemcmahon on Wednesday December 07, 2016 @08:17PM
(#13127686)
GETMAIN, the malloc() equivalent in MVT-derived IBM OSes, does not always zero memory. IIRC, MVS didn't zero it at all, so you might get anything in there, thus the need for a call that guaranteed zeroed memory for it. (This is from my memory of assembly programming on MVT/MVS up to the 1990s; z/OS apparently[1] does it somewhat differently now, so that some allocations are definitely zeroed.)
[1] http://www-01.ibm.com/support/docview.wss?uid=isg1OA28314