GTIRB
v2.2.0
GrammaTech Intermediate Representation for Binaries: C++ API
|
#include <Allocator.hpp>
Public Member Functions | |
BumpPtrAllocatorImpl ()=default | |
BumpPtrAllocatorImpl (BumpPtrAllocatorImpl &&Old) | |
~BumpPtrAllocatorImpl () | |
template<typename T > | |
T * | Allocate (size_t Num=1) |
Allocate space for a sequence of objects without constructing them. More... | |
void * | Allocate (size_t Size, size_t Alignment) |
Allocate space at the specified alignment. More... | |
void | Deallocate (const void *, size_t) |
size_t | getBytesAllocated () const |
size_t | GetNumSlabs () const |
size_t | getTotalMemory () const |
BumpPtrAllocatorImpl & | operator= (BumpPtrAllocatorImpl &&RHS) |
void | setRedZoneSize (size_t NewSize) |
Friends | |
template<typename T > | |
class | SpecificBumpPtrAllocator |
Allocate memory in an ever growing pool, as if by bump-pointer.
This isn't strictly a bump-pointer allocator as it uses backing slabs of memory rather than relying on a boundless contiguous heap. However, it has bump-pointer semantics in that it is a monotonically growing pool of memory where every allocation is found by merely allocating the next N bytes in the slab, or the next N bytes in the next slab.
Note that this also has a threshold for forcing allocations above a certain size into their own slab.
|
default |
|
inline |
|
inline |
|
inline |
Allocate space for a sequence of objects without constructing them.
|
inline |
Allocate space at the specified alignment.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |