LLVM API Documentation
#include <Allocator.h>
Public Member Functions | |
SpecificBumpPtrAllocator (size_t size=4096, size_t threshold=4096) | |
SpecificBumpPtrAllocator (size_t size, size_t threshold, SlabAllocator &allocator) | |
~SpecificBumpPtrAllocator () | |
void | DestroyAll () |
T * | Allocate (size_t num=1) |
Allocate space for a specific count of elements. More... | |
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.
Definition at line 190 of file Allocator.h.
|
inline |
Definition at line 193 of file Allocator.h.
|
inline |
Definition at line 195 of file Allocator.h.
|
inline |
Definition at line 199 of file Allocator.h.
References llvm::SpecificBumpPtrAllocator< T >::DestroyAll().
|
inline |
Allocate space for a specific count of elements.
Definition at line 222 of file Allocator.h.
References llvm::BumpPtrAllocator::Allocate().
|
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.
Definition at line 206 of file Allocator.h.
References for(), llvm::MemSlab::NextPtr, llvm::BumpPtrAllocator::Reset(), llvm::MemSlab::Size, and T.
Referenced by llvm::SpecificBumpPtrAllocator< T >::~SpecificBumpPtrAllocator().