BloombergLP::bdlma::BufferManager::BufferManager

Constructors

Synopses

Declared in <bdlma_buffermanager.h>

Create a buffer manager for allocating memory blocks. Optionally specify an alignment strategy used to align allocated memory blocks. If strategy is not specified, natural alignment is used. A default constructed buffer manager is unable to allocate any memory until an external buffer is provided by calling the replaceBuffer method.

explicit
BufferManager(bsls::Alignment::Strategy strategy = bsls::Alignment::BSLS_NATURAL);
» more...

Create a buffer manager for allocating memory blocks from the specified external buffer having the specified bufferSize (in bytes). Optionally specify an alignment strategy used to align allocated memory blocks. If strategy is not specified, natural alignment is used. The behavior is undefined unless 0 < bufferSize and buffer has at least bufferSize bytes.

BufferManager(
    char* buffer,
    bsls::Types::size_type bufferSize,
    bsls::Alignment::Strategy strategy = bsls::Alignment::BSLS_NATURAL);
» more...