class RecyclingAllocator

Declaration

template <class AllocatorType,
          class T,
          size_t Size = sizeof(type - parameter - 0 - 1),
          size_t Align = alignof(type - parameter - 0 - 1)>
class RecyclingAllocator { /* full declaration omitted */ };

Description

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

Declared at: llvm/include/llvm/Support/RecyclingAllocator.h:26

Templates

AllocatorType
T
size_t Size = sizeof(type-parameter-0-1)
size_t Align = alignof(type-parameter-0-1)

Member Variables

private Recycler<T, Size, Align> Base
Base - Implementation details.
private AllocatorType Allocator
Allocator - The wrapped allocator.

Method Overview

Methods

T* Allocate()

Declared at: llvm/include/llvm/Support/RecyclingAllocator.h:45

template <class SubClass>
SubClass* Allocate()

Description

Allocate - Return a pointer to storage for an object of type SubClass. The storage may be either newly allocated or recycled.

Declared at: llvm/include/llvm/Support/RecyclingAllocator.h:43

Templates

SubClass

template <class SubClass>
void Deallocate(SubClass* E)

Description

Deallocate - Release storage for the pointed-to object. The storage will be kept track of and may be recycled.

Declared at: llvm/include/llvm/Support/RecyclingAllocator.h:51

Templates

SubClass

Parameters

SubClass* E

void PrintStats()

Declared at: llvm/include/llvm/Support/RecyclingAllocator.h:53

~RecyclingAllocator<AllocatorType,
                    T,
                    Size,
                    Align>()

Declared at: llvm/include/llvm/Support/RecyclingAllocator.h:37