BloombergLP::bdlma::ConcurrentAllocatorAdapter::ConcurrentAllocatorAdapter

Create a thread-enabled allocator adapter for the specified allocator.

Synopsis

Declared in <bdlma_concurrentallocatoradapter.h>

ConcurrentAllocatorAdapter(
    bslmt::Mutex* mutex,
    bslma::Allocator* basicAllocator);

Description

Create a thread-enabled allocator adapter that uses the specified mutex to synchronize access to the specified basicAllocator. If basicAllocator is 0, the currently installed default allocator is used.

Parameters

NameDescription
mutexmutex used to synchronize access to the allocator
basicAllocatormemory allocator; null uses the default