Constructors
Synopses
Declared in <bdlma_sequentialallocator.h>
Create a sequential allocator for allocating memory blocks from a sequence of dynamically‐allocated buffers, of which the initial buffer has the specified initialSize (in bytes). Optionally specify a basicAllocator used to supply memory for the dynamically‐allocated buffers. If basicAllocator is 0, the currently installed default allocator is used. Optionally specify a growthStrategy used to control buffer growth. If no growthStrategy is specified, geometric growth is used. Optionally specify an alignmentStrategy used to control alignment of allocated memory blocks. If no alignmentStrategy is specified, natural alignment is used. An implementation‐defined value is used as the initial size of the internal buffer. The behavior is undefined unless 0 < initialSize. Note that no limit is imposed on the size of the internal buffers when geometric growth is used. Also note that when constant growth is used, the size of the internal buffers will always be the same as the implementation‐defined value. Also note that SequentialAllocator(int initialSize) is provided to avoid ambiguous definitions.
explicit
SequentialAllocator(int initialSize);
Create a sequential allocator for allocating memory blocks from a sequence of dynamically‐allocated buffers. Optionally specify a basicAllocator used to supply memory for the dynamically‐allocated buffers. If basicAllocator is 0, the currently installed default allocator is used. Optionally specify a growthStrategy used to control buffer growth. If no growthStrategy is specified, geometric growth is used. Optionally specify an alignmentStrategy used to control alignment of allocated memory blocks. If no alignmentStrategy is specified, natural alignment is used. Note that no limit is imposed on the size of the internal buffers when geometric growth is used.
explicit
SequentialAllocator(bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
explicit
SequentialAllocator(
bsls::Alignment::Strategy alignmentStrategy,
bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
explicit
SequentialAllocator(
bsls::BlockGrowth::Strategy growthStrategy,
bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
explicit
SequentialAllocator(
bsls::Types::size_type initialSize,
bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
SequentialAllocator(
bsls::BlockGrowth::Strategy growthStrategy,
bsls::Alignment::Strategy alignmentStrategy,
bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
SequentialAllocator(
bsls::Types::size_type initialSize,
bsls::Alignment::Strategy alignmentStrategy,
bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
SequentialAllocator(
bsls::Types::size_type initialSize,
bsls::BlockGrowth::Strategy growthStrategy,
bslma::Allocator* basicAllocator = 0);
Create a sequential allocator for allocating memory blocks from a sequence of dynamically‐allocated buffers, of which the initial buffer has the specified initialSize (in bytes), and the buffer growth is limited to the specified maxBufferSize. Optionally specify a basicAllocator used to supply memory for the dynamically‐allocated buffers. If basicAllocator is 0, the currently installed default allocator is used. Optionally specify a growthStrategy used to control buffer growth. If no growthStrategy is specified, geometric growth is used. Optionally specify an alignmentStrategy used to control alignment of allocated memory blocks. If no alignmentStrategy is specified, natural alignment is used. The behavior is undefined unless 0 < initialSize and initialSize <= maxBufferSize. Note that when constant growth is used, the size of the internal buffers will always be the same as initialSize.
SequentialAllocator(
bsls::Types::size_type initialSize,
bsls::Types::size_type maxBufferSize,
bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
SequentialAllocator(
bsls::Types::size_type initialSize,
bsls::BlockGrowth::Strategy growthStrategy,
bsls::Alignment::Strategy alignmentStrategy,
bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
SequentialAllocator(
bsls::Types::size_type initialSize,
bsls::Types::size_type maxBufferSize,
bsls::Alignment::Strategy alignmentStrategy,
bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
SequentialAllocator(
bsls::Types::size_type initialSize,
bsls::Types::size_type maxBufferSize,
bsls::BlockGrowth::Strategy growthStrategy,
bslma::Allocator* basicAllocator = 0);
See the overload above for contract.
SequentialAllocator(
bsls::Types::size_type initialSize,
bsls::Types::size_type maxBufferSize,
bsls::BlockGrowth::Strategy growthStrategy,
bsls::Alignment::Strategy alignmentStrategy,
bslma::Allocator* basicAllocator = 0);
Created with MrDocs