[#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. == Synopsis Declared in `<bslma_default.h>` [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‐specified `basicAllocator` is 0; return `basicAllocator` otherwise. == 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]#