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

Synopsis

Declared in <bdlma_concurrentmultipool.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 > 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. If size is 0, no memory is allocated and 0 is returned.

Return Value

address of the allocated block, or 0 if size is 0

Parameters

Name

Description

size

number of bytes to allocate

Created with MrDocs