15 #ifndef LLVM_SUPPORT_RECYCLINGALLOCATOR_H
16 #define LLVM_SUPPORT_RECYCLINGALLOCATOR_H
25 template <
class AllocatorType,
class T,
size_t Size =
sizeof(
T),
26 size_t Align =
alignof(
T)>
35 AllocatorType Allocator;
43 template<
class SubClass>
44 SubClass *
Allocate() {
return Base.template Allocate<SubClass>(Allocator); }
51 template<
class SubClass>
52 void Deallocate(SubClass*
E) {
return Base.Deallocate(Allocator, E); }
55 Allocator.PrintStats();
62 template<
class AllocatorType,
class T,
size_t Size,
size_t Align>
63 inline void *
operator new(
size_t size,
66 assert(size <= Size &&
"allocation size exceeded");
70 template<
class AllocatorType,
class T,
size_t Size,
size_t Align>
71 inline void operator delete(
void *
E,
void Deallocate(SubClass *E)
Deallocate - Release storage for the pointed-to object.
RecyclingAllocator - This class wraps an Allocator, adding the functionality of recycling deleted obj...
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
Greedy Register Allocator
Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated ...
SubClass * Allocate()
Allocate - Return a pointer to storage for an object of type SubClass.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static GCRegistry::Add< ErlangGC > A("erlang","erlang-compatible garbage collector")