llvm::Recycler< T, Size, Align > Class Template Reference
Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated memory in place of allocating new memory.
More...
#include <Recycler.h>
List of all members.
Public Member Functions |
| | ~Recycler () |
| template<class AllocatorType > |
| void | clear (AllocatorType &Allocator) |
| | clear - Release all the tracked allocations to the allocator.
|
| template<class SubClass , class AllocatorType > |
| SubClass * | Allocate (AllocatorType &Allocator) |
| template<class AllocatorType > |
| T * | Allocate (AllocatorType &Allocator) |
| template<class SubClass , class AllocatorType > |
| void | Deallocate (AllocatorType &, SubClass *Element) |
| void | PrintStats () |
Private Attributes |
| iplist< RecyclerStruct > | FreeList |
| | FreeList - Doubly-linked list of nodes that have deleted contents and are not in active use.
|
Detailed Description
template<class T, size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
class llvm::Recycler< T, Size, Align >
Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated memory in place of allocating new memory.
Constructor & Destructor Documentation
template<class T , size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
Member Function Documentation
template<class T , size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
template<class AllocatorType >
| T* llvm::Recycler< T, Size, Align >::Allocate |
( |
AllocatorType & |
Allocator |
) |
[inline] |
template<class T , size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
template<class SubClass , class AllocatorType >
| SubClass* llvm::Recycler< T, Size, Align >::Allocate |
( |
AllocatorType & |
Allocator |
) |
[inline] |
template<class T , size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
template<class AllocatorType >
| void llvm::Recycler< T, Size, Align >::clear |
( |
AllocatorType & |
Allocator |
) |
[inline] |
clear - Release all the tracked allocations to the allocator.
The recycler must be free of any tracked allocations before being deleted; calling clear is one way to ensure this.
template<class T , size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
template<class SubClass , class AllocatorType >
| void llvm::Recycler< T, Size, Align >::Deallocate |
( |
AllocatorType & |
, |
|
|
SubClass * |
Element | |
|
) |
| | [inline] |
template<class T , size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
Member Data Documentation
template<class T , size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment>
FreeList - Doubly-linked list of nodes that have deleted contents and are not in active use.
The documentation for this class was generated from the following file: