[#BloombergLP-bdlma-BufferedSequentialAllocator-2constructor-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::xref:BloombergLP/bdlma/BufferedSequentialAllocator.adoc[BufferedSequentialAllocator]::BufferedSequentialAllocator
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bdlma&lowbar;bufferedsequentialallocator&period;h&gt;`

Create a buffered sequential allocator for allocating memory blocks from the specified external `buffer` having the specified `size` (in bytes)&period; Optionally specify a `growthStrategy` used to control buffer growth&period; If a `growthStrategy` is not specified, geometric growth is used&period; Optionally specify an `alignmentStrategy` used to align allocated memory blocks&period; If an `alignmentStrategy` is not specified, natural alignment is used&period; Optionally specify a `basicAllocator` used to supply memory should the capacity of `buffer` be exhausted&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `0 &lt; size`, and `buffer` has at least `size` bytes&period; Note that, due to alignment effects, it is possible that not all `size` bytes of memory in `buffer` can be used for allocation&period; Also note that no limit is imposed on the size of the internal buffers when geometric growth is used&period; Also note that when constant growth is used, the size of the internal buffers will always be the same as `size`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-07.adoc[BufferedSequentialAllocator](
    char* buffer,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] size,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-07.adoc[_» more&period;&period;&period;_]#

Create a buffered sequential allocator using the specified alignment strategy for allocations from `buffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-0c.adoc[BufferedSequentialAllocator](
    char* buffer,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] size,
    xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] alignmentStrategy,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-0c.adoc[_» more&period;&period;&period;_]#

Create a buffered sequential allocator using the specified growth strategy for allocations from `buffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-02.adoc[BufferedSequentialAllocator](
    char* buffer,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] size,
    xref:BloombergLP/bsls/BlockGrowth/Strategy.adoc[bsls::BlockGrowth::Strategy] growthStrategy,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-02.adoc[_» more&period;&period;&period;_]#

Create a buffered sequential allocator for allocating memory blocks from the specified external `buffer` having the specified `size` (in bytes), or from an internal buffer (after the external `buffer` is exhausted) where the buffer growth is limited to the specified `maxBufferSize` (in bytes)&period; Optionally specify a `growthStrategy` used to control buffer growth&period; If a `growthStrategy` is not specified, geometric growth is used&period; Optionally specify an `alignmentStrategy` used to align allocated memory blocks&period; If an `alignmentStrategy` is not specified, natural alignment is used&period; Optionally specify a `basicAllocator` used to supply memory should the capacity of `buffer` be exhausted&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `0 &lt; size`, `size &lt;&equals; maxBufferSize`, and `buffer` has at least `size` bytes&period; Note that, due to alignment effects, it is possible that not all `size` bytes of memory in `buffer` can be used for allocation&period; Also note that when constant growth is used, the size of the internal buffers will always be the same as `size`&period; Create a buffered sequential allocator with growth limited to `maxBufferSize`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-06a.adoc[BufferedSequentialAllocator](
    char* buffer,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] size,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] maxBufferSize,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-06a.adoc[_» more&period;&period;&period;_]#

Create a buffered sequential allocator using the specified growth and alignment strategies for allocations from `buffer`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-0b.adoc[BufferedSequentialAllocator](
    char* buffer,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] size,
    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/BufferedSequentialAllocator/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Create a buffered sequential allocator with the specified alignment strategy&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-08.adoc[BufferedSequentialAllocator](
    char* buffer,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] size,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;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/BufferedSequentialAllocator/2constructor-08.adoc[_» more&period;&period;&period;_]#

Create a buffered sequential allocator with growth limited to `maxBufferSize` and the specified growth strategy&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-069.adoc[BufferedSequentialAllocator](
    char* buffer,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] size,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;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/BufferedSequentialAllocator/2constructor-069.adoc[_» more&period;&period;&period;_]#

Create a buffered sequential allocator with the specified growth and alignment strategies&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlma/BufferedSequentialAllocator/2constructor-0f.adoc[BufferedSequentialAllocator](
    char* buffer,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] size,
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;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/BufferedSequentialAllocator/2constructor-0f.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
