void *calloc(size_t count, size_t size) {
assert(!multiplication_would_overflow(count, size));
size_t allocation_size = count * size;
void *allocation = malloc(allocation_size);
memset(allocation, 0, allocation_size);
return allocation;
}
Should really return (void *)0 on overflow, instead of asserting.