Allocate size bytes aligned to align, throwing std::bad_alloc on failure.

Synopsis

Declared in <folly/memory/Malloc.h>

void*
checkedAlignedMalloc(
    size_t align,
    size_t size);

Description

methodset Allocation Wrappers

Return Value

void* pointer to the aligned buffer

Parameters

Name

Description

align

Alignment in bytes; must be a power of two and >= sizeof(void*).

size

Size of the allocation in bytes; must be a multiple of align.

Created with MrDocs