LLVM API Documentation

llvm::BumpPtrAllocator Class Reference

#include <Allocator.h>

Collaboration diagram for llvm::BumpPtrAllocator:
[legend]

List of all members.

Public Member Functions

 BumpPtrAllocator ()
 ~BumpPtrAllocator ()
void Reset ()
void * Allocate (size_t Size, size_t Alignment)
template<typename T>
T * Allocate ()
template<typename T>
T * Allocate (size_t Num)
void Deallocate (void *)
void PrintStats () const


Detailed Description

BumpPtrAllocator - This allocator is useful for containers that need very simple memory allocation strategies. In particular, this just keeps allocating memory, and never deletes it until the entire block is dead. This makes allocation speedy, but must only be used when the trade-off is ok.

Definition at line 48 of file Allocator.h.


Constructor & Destructor Documentation

BumpPtrAllocator::BumpPtrAllocator (  ) 

Definition at line 101 of file Allocator.cpp.

BumpPtrAllocator::~BumpPtrAllocator (  ) 

Definition at line 106 of file Allocator.cpp.


Member Function Documentation

void BumpPtrAllocator::Reset (  ) 

void * BumpPtrAllocator::Allocate ( size_t  Size,
size_t  Alignment 
)

template<typename T>
T* llvm::BumpPtrAllocator::Allocate (  )  [inline]

Definition at line 62 of file Allocator.h.

References T.

Referenced by Allocate().

template<typename T>
T* llvm::BumpPtrAllocator::Allocate ( size_t  Num  )  [inline]

Definition at line 67 of file Allocator.h.

References Allocate(), and T.

void llvm::BumpPtrAllocator::Deallocate ( void *   )  [inline]

Definition at line 71 of file Allocator.h.

Referenced by llvm::MachineFunction::~MachineFunction().

void BumpPtrAllocator::PrintStats (  )  const

Definition at line 124 of file Allocator.cpp.

References llvm::cerr(), and R.


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