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

Name

Description

objectSize

size in bytes of each pooled memory block

poolSize

maximum number of blocks that may be allocated

basicAllocator

memory allocator; null uses the default

Created with MrDocs