GTIRB  v2.2.0
GrammaTech Intermediate Representation for Binaries: C++ API
Public Member Functions | List of all members
gtirb::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 gtirb::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.

(Deprecated) Available in the global namespace when GTIRB_WRAP_UTILS_IN_NAMESPACE is enabled.

Constructor & Destructor Documentation

◆ SpecificBumpPtrAllocator() [1/2]

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

◆ SpecificBumpPtrAllocator() [2/2]

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

◆ ~SpecificBumpPtrAllocator()

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

Member Function Documentation

◆ Allocate()

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

Allocate space for an array of objects without constructing them.

◆ ForgetAllocations()

template<typename T >
void gtirb::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& gtirb::SpecificBumpPtrAllocator< T >::operator= ( SpecificBumpPtrAllocator< T > &&  RHS)
inline

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