14#ifndef LLVM_SUPPORT_RECYCLINGALLOCATOR_H
15#define LLVM_SUPPORT_RECYCLINGALLOCATOR_H
24template <
class AllocatorType,
class T,
size_t Size =
sizeof(
T),
34 AllocatorType Allocator;
42 template<
class SubClass>
50 template<
class SubClass>
51 void Deallocate(SubClass*
E) {
return Base.Deallocate(Allocator,
E); }
54 Allocator.PrintStats();
61template<
class AllocatorType,
class T,
size_t Size,
size_t Align>
62inline void *
operator new(
size_t size,
65 assert(size <=
Size &&
"allocation size exceeded");
69template<
class AllocatorType,
class T,
size_t Size,
size_t Align>
70inline void operator delete(
void *
E,
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Recycler - This class manages a linked-list of deallocated nodes and facilitates reusing deallocated ...
RecyclingAllocator - This class wraps an Allocator, adding the functionality of recycling deleted obj...
SubClass * Allocate()
Allocate - Return a pointer to storage for an object of type SubClass.
void Deallocate(SubClass *E)
Deallocate - Release storage for the pointed-to object.
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.