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

Unconditionally set the address of the default allocator&period;

== Synopsis

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

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

== Description

Unconditionally set the address of the default allocator to the specified `basicAllocator`&period; In C&plus;&plus;17 and later, a call to this method will also set the default `std&colon;&colon;pmr&colon;&colon;memory&lowbar;resource`&period; The behavior is undefined unless `basicAllocator` is the address of an allocator with sufficient lifetime to satisfy all allocation requests within this process, and unless there is only one thread started within this process&period; Note that this method is intended for use _only_ in _testing_ where the caller affirmatively takes responsibility for the behavior of all clients of the default allocator, and should _not_ be used for any other purpose&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *basicAllocator*
| allocator to install as the default allocator
|===


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