That depends on the implementer of your standard library, not on the host system. It is not possible to give a specific answer for a particular OS, since it may be the build target of multiple compilers and their libraries - including on other systems, if you consider the possibility of cross-compiling (building on one type of system to target another).
Most implementations I've seen of calloc()
use a call of malloc()
followed by either a call of memset()
or (with some implementations that target unix) a legacy function called bzero()
- which is, itself, sometimes replaced by a macro call that expands to a call of memset()
in a number of recent versions of libraries.
memset()
is often hand-optimised. But, again, it is up to the implementer of the library.