Return a contiguous block of maximally‐aligned memory of at least size.

Synopsis

Declared in <bdlma_multipool.h>

void*
allocate(bsls::Types::size_type size);

Description

Return the address of a contiguous block of maximally‐aligned memory of (at least) the specified size (in bytes). If size is 0, no memory is allocated and 0 is returned. If size > maxPooledBlockSize(), the memory allocation is managed directly by the underlying allocator, and will not be pooled, but will be deallocated when the release method is called, or when this object is destroyed.

Return Value

address of the newly allocated block, or a null pointer if size is 0

Parameters

Name

Description

size

number of bytes to allocate

Created with MrDocs