Unconditionally set the address of the default allocator.
Synopsis
Declared in <bslma_default.h>
static
void
setDefaultAllocatorRaw(Allocator* basicAllocator);
Description
Unconditionally set the address of the default allocator to the specified basicAllocator. In C++17 and later, a call to this method will also set the default std::pmr::memory_resource. 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. 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.
Parameters
Name |
Description |
basicAllocator |
allocator to install as the default allocator |
Created with MrDocs