Memory pool that allocates blocks of a fixed value type.
Synopsis
Declared in <bslstl_simplepool.h>
template<
class VALUE,
class ALLOCATOR>
class SimplePool
: public SimplePool_Type<ALLOCATOR>::AllocatorType
Description
This class provides methods for creating and deleting nodes using the appropriate allocator‐traits of the parameterized ALLOCATOR. This type is intended to be used as a private base‐class for a node‐based container, in order to take advantage of the empty‐base‐class optimization in the case where the base‐class has 0 size (as may the case if the parameterized ALLOCATOR is not a bslma::Allocator).
Base Classes
Name |
Description |
|
Type Aliases
Name |
Description |
Alias for the allocator traits for the parameterized |
|
Alias for the allocator type for a |
|
Alias for the parameterized type |
|
Unsigned integer type measuring pool size. |
Member Functions
Name |
Description |
|
Create a memory pool that adopts the allocations of |
|
Create a memory pool that uses the specified |
|
Destroy this pool, releasing all associated memory back to the underlying allocator. |
Adopt all outstanding allocations from the specified |
|
Return the address of a block of memory of at least the size of |
|
Return a modifiable reference to this pool's rebound allocator. |
|
Return a non‐modifiable reference to this pool's rebound allocator. |
|
Relinquish the memory block at |
|
Return |
|
Exchange this pool's memory blocks and allocator with those of |
|
Exchange this pool's memory blocks with those of |
|
Relinquish all memory currently allocated via this pool object. |
|
Reserve memory for at least the specified |
|
Exchange this pool's memory blocks with those of |
Created with MrDocs