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).
Synopsis
Declared in <bslstl_simplepool.h>
template<
class VALUE,
class ALLOCATOR>
class SimplePool
: public SimplePool_Type<ALLOCATOR>::AllocatorType
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, adopting all outstanding memory allocations associated with the specified |
|
Create a memory pool that returns blocks of contiguous memory of the size of the parameterized |
|
Destroy this pool, releasing all associated memory back to the underlying allocator. |
Adopt all outstanding memory allocations associated with the specified memory |
|
Return the address of a block of memory of at least the size of |
|
Return a reference providing modifiable access to the rebound allocator traits for the node‐type. Note that this operation returns a base‐class ( |
|
Return a reference providing non‐modifiable access to the rebound allocator traits for the node‐type. Note that this operation returns a base‐class ( |
|
Relinquish the memory block at the specified |
|
Return |
|
Efficiently exchange the memory blocks and the allocator of this object with those of the specified |
|
Efficiently exchange the memory blocks of this object with those of the specified |
|
Relinquish all memory currently allocated via this pool object. |
|
Dynamically allocate a new chunk containing the specified |
|
Efficiently exchange the memory blocks of this object with those of the specified |
Created with MrDocs