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

Create an `AligningAllocator` object that guarantees alignment by the specified `alignment` (in bytes) of memory allocated&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0 or not supplied, the currently installed default allocator is used&period; The behavior is undefined unless `alignment` is a power of 2, and the alignment strategy of the alocator used to supply memory is `BSLS&lowbar;MAXIMUM` or `BSLS&lowbar;NATURAL`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
AligningAllocator(
    xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size&lowbar;type] alignment,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----


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