ref: 11b5c4b8bf0a15777e9a7f2292f6c80f5a7b4a2d
dir: /sys/src/ape/lib/ap/gen/calloc.c/
#include <stdlib.h>
#include <string.h>
void *
calloc(size_t n, size_t s)
{
void *v;
if(n > 1 && ((size_t)-1)/n < s)
return 0;
n *= s;
if(v = malloc(n))
memset(v, 0, n);
return v;
}