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:
- Count or counted, because
calloctakes a separate count argument. -
Clear, because it ensures that the returned memory chunk has been cleared.
- Brian Kernighan is reported to believe that the “c” stands for clear (although he has admitted he’s not sure).
- (See comments.) An early
calloc.cseems 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 filemalloc.c, the word clear appears again, in reference to the wordcalloc.
-
C, as in the C language.
- (See alk’s answer and comments.) Possibly a naming convention for a set of functions that were introduced at about the same time.