A student asked the question and I didn't know for sure.
Guesses include: "counted", "clearing", "chunked", "complete", ...
The standard library documentation doesn't say what it stands for and there aren't similarly named functions that would indicate a pattern. Does anyone know the actual etymology and perhaps have an authoritative reference to back it up?
According to an excerpt from the book Linux System Programming (by Robert Love), no official sources exist on the etymology of calloc
.
Some plausible candidates seem to be:
calloc
takes a separate count argument.Clear, because it ensures that the returned memory chunk has been cleared.
calloc.c
seems to contain an explicit reference to the word clear in a source code comment (but no reference to the word count or to any other candidate). In another source code comment in the file malloc.c
, the word clear appears again, in reference to the word calloc
. C, as in the C language.