template<typename TAllocator, typename TNode>
struct alib::containers::detail::RecyclerVoid< TAllocator, TNode >
Implements internal recycling interface. Used by container types of module ALib Containers that omit recycling (when their template parameter TRecycling evaluates to None).
- Template Parameters
-
TAllocator | The allocator to store and use. |
TNode | The type to recycle. Has to be derived of lang::SidiNodeBase. |
Definition at line 570 of file recycler.hpp.
|
| RecyclerVoid ()=default |
| Parameterless constructor. Used with type HeapAllocator.
|
|
| RecyclerVoid (TAllocator &pAllocator) noexcept |
|
constexpr integer | Count () const noexcept |
|
template<typename TChunk > |
void | DisposeChunk (TChunk *chunk, size_t length) noexcept |
|
void | DisposeList (TNode *begin) noexcept |
|
std::pair< TNode *, integer > | DisposeList (TNode *begin, TNode *end) noexcept |
|
TNode * | Get () |
|
void | Recycle (TNode *elem) noexcept |
|
template<typename TChunk > |
constexpr void | RecycleChunk (TChunk *chunk, size_t length) noexcept |
|
void | RecycleList (TNode *begin) noexcept |
|
std::pair< TNode *, integer > | RecycleList (TNode *begin, TNode *end) noexcept |
|
void | Reserve (integer) noexcept |
| Does nothing. In debug-compilations a warning is raised.
|
|
void | Reset () noexcept |
| Does nothing. Shared recyclers can't be reset.
|
|
| AllocatorMember ()=delete |
| Deleted default constructor. (The allocator has to be given with construction)
|
|
| AllocatorMember (TAllocator &pAllocator) noexcept |
|
AllocatorInterface< TAllocator > | AI () const noexcept |
|
TAllocator & | GetAllocator () const noexcept |
|
template<typename TAllocator , typename TNode >
template<typename TChunk >
void DisposeChunk |
( |
TChunk * | chunk, |
|
|
size_t | length ) |
|
inlinenoexcept |
Frees the given memory. Note that the shared recycler calls RecycleChunk with this method.
- Template Parameters
-
TChunk | The type of array that is to be freed. |
- Parameters
-
chunk | The chunk array to convert into nodes |
length | The length of the chunk array (pass 1 if the chunk is not an array type). |
Definition at line 657 of file recycler.hpp.
template<typename TAllocator , typename TNode >
template<typename TChunk >
void RecycleChunk |
( |
TChunk * | chunk, |
|
|
size_t | length ) |
|
inlineconstexprnoexcept |
With other recyclers, this method converts a given chunk of memory, previously allocated with the same allocator that this type uses, into recyclable node objects.
This recycler just frees the object.
- Template Parameters
-
TChunk | The type of array that is to be cut into node elements. |
- Parameters
-
chunk | The chunk array to convert into nodes |
length | The length of the chunk array (pass 1 if the chunk is not an array type). |
Definition at line 643 of file recycler.hpp.