[#BloombergLP-bdlma-SequentialPool-2constructor-0251] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::xref:BloombergLP/bdlma/SequentialPool.adoc[SequentialPool]::SequentialPool :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bdlma_sequentialpool.h>` Create a sequential pool 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. By specifying an `initialSize`, the construction of a sequential pool will incur a memory allocation. 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 `initialSize`. Also note that `SequentialPool(int initialSize)` is provided to avoid ambiguous definitions. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdlma/SequentialPool/2constructor-04.adoc[SequentialPool](int initialSize); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-04.adoc[_» more..._]# Create a sequential pool 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. An implementation‐defined value is used as the initial size of the internal buffer. 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdlma/SequentialPool/2constructor-0e9.adoc[SequentialPool](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-0e9.adoc[_» more..._]# Create a sequential pool using the specified alignment strategy. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdlma/SequentialPool/2constructor-0f.adoc[SequentialPool]( xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] alignmentStrategy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-0f.adoc[_» more..._]# Create a sequential pool using the specified growth strategy. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdlma/SequentialPool/2constructor-0a.adoc[SequentialPool]( xref:BloombergLP/bsls/BlockGrowth/Strategy.adoc[bsls::BlockGrowth::Strategy] growthStrategy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-0a.adoc[_» more..._]# Create a sequential pool whose initial buffer has the specified `initialSize`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdlma/SequentialPool/2constructor-06.adoc[SequentialPool]( xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] initialSize, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-06.adoc[_» more..._]# Create a sequential pool using the specified growth and alignment strategies and an implementation‐defined initial buffer size. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/SequentialPool/2constructor-015.adoc[SequentialPool]( xref:BloombergLP/bsls/BlockGrowth/Strategy.adoc[bsls::BlockGrowth::Strategy] growthStrategy, xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] alignmentStrategy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-015.adoc[_» more..._]# Create a sequential pool whose initial buffer has the specified `initialSize` and alignment strategy. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/SequentialPool/2constructor-01e.adoc[SequentialPool]( xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] initialSize, xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] alignmentStrategy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-01e.adoc[_» more..._]# Create a sequential pool whose initial buffer has the specified `initialSize` and growth strategy. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/SequentialPool/2constructor-0e6.adoc[SequentialPool]( xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] initialSize, xref:BloombergLP/bsls/BlockGrowth/Strategy.adoc[bsls::BlockGrowth::Strategy] growthStrategy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-0e6.adoc[_» more..._]# Create a sequential pool for allocating memory blocks from a sequence of dynamically‐allocated buffers, of which the initial buffer has the specified `initialSize` (in bytes), and the internal 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`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/SequentialPool/2constructor-0c.adoc[SequentialPool]( xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] initialSize, xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] maxBufferSize, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-0c.adoc[_» more..._]# Create a sequential pool whose initial buffer has the specified `initialSize`, growth strategy, and alignment strategy. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/SequentialPool/2constructor-02c.adoc[SequentialPool]( xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] initialSize, xref:BloombergLP/bsls/BlockGrowth/Strategy.adoc[bsls::BlockGrowth::Strategy] growthStrategy, xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] alignmentStrategy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-02c.adoc[_» more..._]# Create a sequential pool with growth limited to `maxBufferSize` and the specified alignment strategy. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/SequentialPool/2constructor-0253.adoc[SequentialPool]( xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] initialSize, xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] maxBufferSize, xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] alignmentStrategy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-0253.adoc[_» more..._]# Create a sequential pool with growth limited to `maxBufferSize` and the specified growth strategy. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/SequentialPool/2constructor-09.adoc[SequentialPool]( xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] initialSize, xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] maxBufferSize, xref:BloombergLP/bsls/BlockGrowth/Strategy.adoc[bsls::BlockGrowth::Strategy] growthStrategy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-09.adoc[_» more..._]# Create a sequential pool with growth limited to `maxBufferSize` and the specified growth and alignment strategies. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/SequentialPool/2constructor-01d.adoc[SequentialPool]( xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] initialSize, xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] maxBufferSize, xref:BloombergLP/bsls/BlockGrowth/Strategy.adoc[bsls::BlockGrowth::Strategy] growthStrategy, xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] alignmentStrategy, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-01d.adoc[_» more..._]# Create a sequential pool for allocating memory blocks from a sequence of dynamically‐allocated buffers, of which the initial buffer has the specified `initialSize` (in bytes), the internal buffer growth is limited to the specified `maxBufferSize`, the specified `growthStrategy` is used to control buffer growth, and the specified `alignmentStrategy` is used to control alignment of allocated memory blocks. Allocate the initial buffer only if the specified `allocateInitialBuffer` is `true`. Optionally specify a `basicAllocator` used to supply memory for the dynamically‐allocated buffers. If `basicAllocator` is 0, the currently installed default allocator 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`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/SequentialPool/2constructor-0b.adoc[SequentialPool]( xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] initialSize, xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] maxBufferSize, xref:BloombergLP/bsls/BlockGrowth/Strategy.adoc[bsls::BlockGrowth::Strategy] growthStrategy, xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] alignmentStrategy, bool allocateInitialBuffer, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdlma/SequentialPool/2constructor-0b.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#