3 ms·
calloc differs from malloc, as it clears the memory. From the Mac OS X man page: The calloc() function contiguously allocates enough space for count objects t
by petsos 15y ago
calloc differs from malloc, as it clears the memory.
From the Mac OS X man page:
The calloc() function contiguously allocates enough space for count objects that are size bytes of memory each and returns a pointer to the allocated memory. The allocated memory is filled with bytes of value zero.
- lloeki 15y agoAh sorry, bad version copy/paste on my part. I actually used calloc at some point to compare behaviors in allocation time with malloc, but with malloc it still has zeros everywhere. Nice for security, but how would one proceed when really wanting pedal-to-the-metal performance?