In our previous episode, Michael Schnell said: > > No, calloc simply zeroes the allocated memory. > > So why does it provide a size argument ? Just to zero the information it > would suffice to give it a byte count as with malloc().
I don't know, but the FreeBSD manpage says: The calloc() function allocates space for number objects, each size bytes in length. The result is identical to calling malloc() with an argument of ``number * size'', with the exception that the allocated memory is explicitly initialized to zero bytes. Note the .. identical to calling malloc .. except .. initialized to zero bytes, which is exactly what Jonas says. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel