BloombergLP::bslma::NewDeleteAllocator::allocate

Allocate a block of memory of at least the specified size bytes.

Synopses

Declared in <bslma_newdeleteallocator.h>

Allocate a block of memory of at least the specified size bytes.

virtual
void*
allocate(size_type size) override;
» more...
[[nodiscard]]
void*
allocate(
    size_t __bytes,
    size_t __alignment = _S_max_align);
» more...

Return Value

newly allocated memory block, or null if size is 0

Parameters

NameDescription
sizenumber of bytes to allocate