Is calloc better than malloc?
<p>I have just learned about the C <code>calloc()</code> function the other day. Having read its description and how it differs from <code>malloc</code> (<a href="https://stackoverflow.com/a/2688522/634821">1</a>, <a href="https://vorpus.org/blog/why-does-calloc-exist/" rel="noreferrer">2</a>), I get the idea that, as a non-embedded programmer, I should <em>always</em> use <code>calloc()</code>. But is that really the case?</p>

<p>One reservation I have is the extra delay for accessing the <code>calloc()</code>-ed memory, but I also wonder if there are cases when switching from <code>malloc()</code> to <code>calloc()</code> will break the program in some more serious way.</p>

<p>P. S. The zero-initializing aspect of <code>calloc()</code> is quite clear to me. What I'm interested in learning about is the other difference between <code>calloc()</code> and <code>malloc()</code> - lazy memory allocation provided by <code>calloc()</code>. Please don't post an answer if you're going to focus purely on the memory initialization aspect.</p>