folly::allocate_sys_buffer

Allocate a size-byte buffer with std::malloc, throwing on failure.

Synopsis

Declared in <folly/Memory.h>

SysBufferUniquePtr
allocate_sys_buffer(std::size_t size);

Return Value

A unique_ptr owning the allocated buffer.

Parameters

NameDescription
sizeThe number of bytes to allocate.