llvm::SpecificBumpPtrAllocator< T > Class Template Reference

SpecificBumpPtrAllocator - Same as BumpPtrAllocator but allows only elements of one type to be allocated. More...

#include <Allocator.h>

List of all members.

Public Member Functions

 SpecificBumpPtrAllocator (size_t size=4096, size_t threshold=4096, SlabAllocator &allocator=BumpPtrAllocator::DefaultSlabAllocator)
 ~SpecificBumpPtrAllocator ()
void DestroyAll ()
 Call the destructor of each allocated object and deallocate all but the current slab and reset the current pointer to the beginning of it, freeing all memory allocated so far.
T * Allocate (size_t num=1)
 Allocate space for a specific count of elements.

Private Attributes

BumpPtrAllocator Allocator

Detailed Description

template<typename T>
class llvm::SpecificBumpPtrAllocator< T >

SpecificBumpPtrAllocator - Same as BumpPtrAllocator but allows only elements of one type to be allocated.

This allows calling the destructor in DestroyAll() and when the allocator is destroyed.


Constructor & Destructor Documentation

template<typename T >
llvm::SpecificBumpPtrAllocator< T >::SpecificBumpPtrAllocator ( size_t  size = 4096,
size_t  threshold = 4096,
SlabAllocator allocator = BumpPtrAllocator::DefaultSlabAllocator 
) [inline]
template<typename T >
llvm::SpecificBumpPtrAllocator< T >::~SpecificBumpPtrAllocator (  )  [inline]

Member Function Documentation

template<typename T >
T* llvm::SpecificBumpPtrAllocator< T >::Allocate ( size_t  num = 1  )  [inline]

Allocate space for a specific count of elements.

template<typename T >
void llvm::SpecificBumpPtrAllocator< T >::DestroyAll (  )  [inline]

Call the destructor of each allocated object and deallocate all but the current slab and reset the current pointer to the beginning of it, freeing all memory allocated so far.


Member Data Documentation

template<typename T >
BumpPtrAllocator llvm::SpecificBumpPtrAllocator< T >::Allocator [private]

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

Generated on 2 Nov 2013 for Galois by  doxygen 1.6.1