class Recycler
Declaration
template <class T,
size_t Size = sizeof(type - parameter - 0 - 0),
size_t Align = alignof(type - parameter - 0 - 0)>
class Recycler { /* full declaration omitted */ };
Description
Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated memory in place of allocating new memory.
Declared at: llvm/include/llvm/Support/Recycler.h:34
Templates
- T
- size_t Size = sizeof(type-parameter-0-0)
- size_t Align = alignof(type-parameter-0-0)
Method Overview
- public template <class SubClass, class AllocatorType>SubClass * Allocate(AllocatorType & Allocator)
- public template <class AllocatorType>T * Allocate(AllocatorType & Allocator)
- public template <class SubClass, class AllocatorType>void Deallocate(AllocatorType &, SubClass * Element)
- public void PrintStats()
- public void clear(llvm::BumpPtrAllocator &)
- public template <class AllocatorType>void clear(AllocatorType & Allocator)
- public ~Recycler<T, Size, Align>()
Methods
¶template <class SubClass, class AllocatorType>
SubClass* Allocate(AllocatorType& Allocator)
template <class SubClass, class AllocatorType>
SubClass* Allocate(AllocatorType& Allocator)
Declared at: llvm/include/llvm/Support/Recycler.h:83
Templates
- SubClass
- AllocatorType
Parameters
- AllocatorType& Allocator
¶template <class AllocatorType>
T* Allocate(AllocatorType& Allocator)
template <class AllocatorType>
T* Allocate(AllocatorType& Allocator)
Declared at: llvm/include/llvm/Support/Recycler.h:93
Templates
- AllocatorType
Parameters
- AllocatorType& Allocator
¶template <class SubClass, class AllocatorType>
void Deallocate(AllocatorType&, SubClass* Element)
template <class SubClass, class AllocatorType>
void Deallocate(AllocatorType&, SubClass* Element)
Declared at: llvm/include/llvm/Support/Recycler.h:98
Templates
- SubClass
- AllocatorType
Parameters
- AllocatorType&
- SubClass* Element
¶void PrintStats()
void PrintStats()
Declared at: llvm/include/llvm/Support/Recycler.h:102
¶void clear(llvm::BumpPtrAllocator&)
void clear(llvm::BumpPtrAllocator&)
Description
Special case for BumpPtrAllocator which has an empty Deallocate() function. There is no need to traverse the free list, pulling all the objects into cache.
Declared at: llvm/include/llvm/Support/Recycler.h:80
Parameters
¶template <class AllocatorType>
void clear(AllocatorType& Allocator)
template <class AllocatorType>
void clear(AllocatorType& Allocator)
Description
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.
Declared at: llvm/include/llvm/Support/Recycler.h:68
Templates
- AllocatorType
Parameters
- AllocatorType& Allocator
¶~Recycler<T, Size, Align>()
~Recycler<T, Size, Align>()
Declared at: llvm/include/llvm/Support/Recycler.h:57