Trivial wrapper around calloc that check for allocation failure and throw std::bad_alloc in that case.
Declared in <folly/memory/Malloc.h>
void*
checkedCalloc(
size_t n,
size_t size);
methodset Allocation Wrappers
void* pointer to allocated buffer
| Name | Description |
|---|---|
| n | Number of elements |
| size | Size of each element |