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?
man 3 calloc
:void *calloc(size_t nmemb, size_t size);
- Thecalloc()
function allocates memory for an array ofnmemb
elements of size bytes each and returns a pointer to the allocated memory. The memory is set to zero. Ifnmemb
or size is 0, thencalloc()
returns either NULL, or a unique pointer value that can later be successfully passed tofree()
. – Frequent