Reserve capacity for at least numObjects blocks from this pool.

Synopsis

Declared in <bdlma_concurrentfixedpool.h>

int
reserveCapacity(int numObjects);

Description

Reserve memory from this pool to satisfy memory requests for at least the specified numObjects before the pool replenishes. The behavior is undefined unless 0 <= numObjects. Return 0 on success and the number of objects that could not be reserved otherwise. Note that this method fails if the number of memory blocks already allocated plus numObjects exceeds poolSize().

Return Value

0 on success, or the number of objects that could not be reserved

Parameters

Name

Description

numObjects

minimum number of objects to reserve

Created with MrDocs