LLVM 20.0.0git
Public Member Functions | List of all members
llvm::RecyclingAllocator< AllocatorType, T, Size, Align > Class Template Reference

RecyclingAllocator - This class wraps an Allocator, adding the functionality of recycling deleted objects. More...

#include "llvm/Support/RecyclingAllocator.h"

Inheritance diagram for llvm::RecyclingAllocator< AllocatorType, T, Size, Align >:
Inheritance graph
[legend]

Public Member Functions

 ~RecyclingAllocator ()
 
template<class SubClass >
SubClass * Allocate ()
 Allocate - Return a pointer to storage for an object of type SubClass.
 
TAllocate ()
 
template<class SubClass >
void Deallocate (SubClass *E)
 Deallocate - Release storage for the pointed-to object.
 
void PrintStats ()
 

Detailed Description

template<class AllocatorType, class T, size_t Size = sizeof(T), size_t Align = alignof(T)>
class llvm::RecyclingAllocator< AllocatorType, T, Size, Align >

RecyclingAllocator - This class wraps an Allocator, adding the functionality of recycling deleted objects.

Definition at line 26 of file RecyclingAllocator.h.

Constructor & Destructor Documentation

◆ ~RecyclingAllocator()

template<class AllocatorType , class T , size_t Size = sizeof(T), size_t Align = alignof(T)>
llvm::RecyclingAllocator< AllocatorType, T, Size, Align >::~RecyclingAllocator ( )
inline

Definition at line 37 of file RecyclingAllocator.h.

References Allocator, and llvm::sampleprof::Base.

Member Function Documentation

◆ Allocate() [1/2]

template<class AllocatorType , class T , size_t Size = sizeof(T), size_t Align = alignof(T)>
template<class SubClass >
SubClass * llvm::RecyclingAllocator< AllocatorType, T, Size, Align >::Allocate ( )
inline

Allocate - Return a pointer to storage for an object of type SubClass.

The storage may be either newly allocated or recycled.

Definition at line 43 of file RecyclingAllocator.h.

References Allocator, and llvm::sampleprof::Base.

◆ Allocate() [2/2]

template<class AllocatorType , class T , size_t Size = sizeof(T), size_t Align = alignof(T)>
T * llvm::RecyclingAllocator< AllocatorType, T, Size, Align >::Allocate ( )
inline

Definition at line 45 of file RecyclingAllocator.h.

References Allocator, and llvm::sampleprof::Base.

◆ Deallocate()

template<class AllocatorType , class T , size_t Size = sizeof(T), size_t Align = alignof(T)>
template<class SubClass >
void llvm::RecyclingAllocator< AllocatorType, T, Size, Align >::Deallocate ( SubClass *  E)
inline

Deallocate - Release storage for the pointed-to object.

The storage will be kept track of and may be recycled.

Definition at line 51 of file RecyclingAllocator.h.

References Allocator, llvm::sampleprof::Base, and E.

◆ PrintStats()

template<class AllocatorType , class T , size_t Size = sizeof(T), size_t Align = alignof(T)>
void llvm::RecyclingAllocator< AllocatorType, T, Size, Align >::PrintStats ( )
inline

Definition at line 53 of file RecyclingAllocator.h.

References Allocator, and llvm::sampleprof::Base.


The documentation for this class was generated from the following file: