It\'s known that calloc is different than malloc in that it initializes the memory allocated. With calloc, the memory is set to zero.
calloc
malloc
On some platforms in some modes malloc initialises the memory to some typically non-zero value before returning it, so the second version could well initialize the memory twice