GTIRB  v2.1.0
GrammaTech Intermediate Representation for Binaries: C++ API
Public Member Functions | List of all members
SpecificBumpPtrAllocator< T > Class Template Reference

#include <Allocator.hpp>

Public Member Functions

 SpecificBumpPtrAllocator ()
 
 SpecificBumpPtrAllocator (SpecificBumpPtrAllocator &&Old)
 
 ~SpecificBumpPtrAllocator ()
 
T * Allocate (size_t num=1)
 Allocate space for an array of objects without constructing them. More...
 
void ForgetAllocations ()
 
SpecificBumpPtrAllocatoroperator= (SpecificBumpPtrAllocator &&RHS)
 

Detailed Description

template<typename T>
class SpecificBumpPtrAllocator< T >

A BumpPtrAllocator that allows only elements of a specific type to be allocated.

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

Constructor & Destructor Documentation

◆ SpecificBumpPtrAllocator() [1/2]

template<typename T >
SpecificBumpPtrAllocator< T >::SpecificBumpPtrAllocator ( )
inline

◆ SpecificBumpPtrAllocator() [2/2]

template<typename T >
SpecificBumpPtrAllocator< T >::SpecificBumpPtrAllocator ( SpecificBumpPtrAllocator< T > &&  Old)
inline

◆ ~SpecificBumpPtrAllocator()

template<typename T >
SpecificBumpPtrAllocator< T >::~SpecificBumpPtrAllocator ( )
inline

Member Function Documentation

◆ Allocate()

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

Allocate space for an array of objects without constructing them.

◆ ForgetAllocations()

template<typename T >
void SpecificBumpPtrAllocator< T >::ForgetAllocations ( )
inline

Forgets all allocations from the underlying allocator, effectively leaking the memory. This is useful when the allocator is no longer needed and the operating system will be reclaiming the memory (such as at

◆ operator=()

template<typename T >
SpecificBumpPtrAllocator& SpecificBumpPtrAllocator< T >::operator= ( SpecificBumpPtrAllocator< T > &&  RHS)
inline

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