Constructors

Synopses

Declared in <bdlma_bufferedsequentialallocator.h>

Create a buffered sequential allocator backed by the specified buffer.

BufferedSequentialAllocator(
    char* buffer,
    bsls::Types::size_type size,
    bslma::Allocator* basicAllocator = 0);

Create a buffered sequential allocator using the specified alignment strategy for allocations from buffer.

BufferedSequentialAllocator(
    char* buffer,
    bsls::Types::size_type size,
    bsls::Alignment::Strategy alignmentStrategy,
    bslma::Allocator* basicAllocator = 0);

Create a buffered sequential allocator using the specified growth strategy for allocations from buffer.

BufferedSequentialAllocator(
    char* buffer,
    bsls::Types::size_type size,
    bsls::BlockGrowth::Strategy growthStrategy,
    bslma::Allocator* basicAllocator = 0);

Create a buffered sequential allocator with growth limited to maxBufferSize.

BufferedSequentialAllocator(
    char* buffer,
    bsls::Types::size_type size,
    bsls::Types::size_type maxBufferSize,
    bslma::Allocator* basicAllocator = 0);

Create a buffered sequential allocator using the specified growth and alignment strategies for allocations from buffer.

BufferedSequentialAllocator(
    char* buffer,
    bsls::Types::size_type size,
    bsls::BlockGrowth::Strategy growthStrategy,
    bsls::Alignment::Strategy alignmentStrategy,
    bslma::Allocator* basicAllocator = 0);

Create a buffered sequential allocator with growth limited to maxBufferSize and the specified alignment strategy.

BufferedSequentialAllocator(
    char* buffer,
    bsls::Types::size_type size,
    bsls::Types::size_type maxBufferSize,
    bsls::Alignment::Strategy alignmentStrategy,
    bslma::Allocator* basicAllocator = 0);

Create a buffered sequential allocator with growth limited to maxBufferSize and the specified growth strategy.

BufferedSequentialAllocator(
    char* buffer,
    bsls::Types::size_type size,
    bsls::Types::size_type maxBufferSize,
    bsls::BlockGrowth::Strategy growthStrategy,
    bslma::Allocator* basicAllocator = 0);

Create a buffered sequential allocator with growth limited to maxBufferSize and the specified growth and alignment strategies.

BufferedSequentialAllocator(
    char* buffer,
    bsls::Types::size_type size,
    bsls::Types::size_type maxBufferSize,
    bsls::BlockGrowth::Strategy growthStrategy,
    bsls::Alignment::Strategy alignmentStrategy,
    bslma::Allocator* basicAllocator = 0);

Parameters

Name

Description

buffer

external buffer from which to allocate

size

size in bytes of buffer

basicAllocator

memory allocator; null uses the default

alignmentStrategy

strategy used to align allocated memory blocks

growthStrategy

strategy controlling growth of internal buffers

maxBufferSize

maximum dynamically allocated buffer size in bytes

Created with MrDocs