BloombergLP::bslma::BufferAllocator::BufferAllocator

Constructors

Synopses

Declared in <bslma_bufferallocator.h>

Create a buffer allocator that allocates from the specified buffer.

BufferAllocator(
    char* buffer,
    size_type bufSize,
    AllocCallback allocCallback = 0);
» more...

Create a buffer allocator that allocates from the specified buffer using the specified alignment strategy.

BufferAllocator(
    char* buffer,
    size_type bufSize,
    AlignmentStrategy strategy,
    AllocCallback allocCallback = 0);
» more...

Parameters

NameDescription
bufferMemory buffer from which to allocate.
bufSizeSize (in bytes) of buffer.
allocCallbackOptional callback invoked when allocation fails.
strategyAlignment strategy used for allocations.