BloombergLP::bdlma::ConcurrentFixedPool::ConcurrentFixedPool

Create a fixed-size pool of uniformly sized memory blocks.

Synopsis

Declared in <bdlma_concurrentfixedpool.h>

ConcurrentFixedPool(
    int objectSize,
    int poolSize,
    bslma::Allocator* basicAllocator = 0);

Description

Create a memory pool that returns memory of the specified objectSize for each invocation of the allocate method. Configure this pool to support allocation of up to the specified poolSize number of memory blocks. The largest supported poolSize is 33554431. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined unless 0 < objectSize, 0 < poolSize, and 0x1FFFFFF >= poolSize.

Parameters

NameDescription
objectSizesize in bytes of each pooled memory block
poolSizemaximum number of blocks that may be allocated
basicAllocatormemory allocator; null uses the default