Trivial wrapper around calloc that check for allocation failure and throw std::bad_alloc in that case.

Synopsis

Declared in <folly/memory/Malloc.h>

void*
checkedCalloc(
    size_t n,
    size_t size);

Description

methodset Allocation Wrappers

Return Value

void* pointer to allocated buffer

Parameters

Name

Description

n

Number of elements

size

Size of each element

Created with MrDocs