[#bsl-allocator-0df-2constructor-0b9]
= xref:bsl.adoc[bsl]::xref:bsl/allocator-0df.adoc[allocator]::allocator
:relfileprefix: ../../
:mrdocs:

Convert a `bslma&colon;&colon;Allocator` pointer to an `allocator` object&period;

== Synopsis

Declared in `&lt;bslma&lowbar;bslallocator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
allocator(xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* mechanism);
----

== Description

Convert a `bslma&colon;&colon;Allocator` pointer to an `allocator` object that forwards allocation calls to the object pointed to by the specified `mechanism`&period; If `mechanism` is 0, then the currently installed default allocator is used instead&period; Postcondition&colon; &grave; this&hyphen;&gt;mechanism() &equals;&equals; bslma&colon;&colon;Default&colon;&colon;allocator(mechanism) &grave;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *mechanism*
| allocator mechanism to use&semi; if 0, use the default
|===


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