[#BloombergLP-bslma-Default-allocator]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/Default.adoc[Default]::allocator
:relfileprefix: ../../../
:mrdocs:

Return `basicAllocator`, or the default allocator if it is 0&period;

== Synopsis

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

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

== Description

Return the allocator returned by `defaultAllocator` and disable all subsequent calls to the `setDefaultAllocator` method if the optionally&hyphen;specified `basicAllocator` is 0&semi; return `basicAllocator` otherwise&period;

== Return Value

`basicAllocator`, or the default allocator if it is 0

== Parameters

[cols="1,4"]
|===
| Name| Description
| *basicAllocator*
| allocator to return, or 0 for the default
|===


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