|
LLVM 24.0.0git
|
A BumpPtrAllocator that allows only elements of a specific type to be allocated. More...
#include "llvm/Support/Allocator.h"
Public Member Functions | |
| SpecificBumpPtrAllocator () | |
| SpecificBumpPtrAllocator (SpecificBumpPtrAllocator &&Old) | |
| ~SpecificBumpPtrAllocator () | |
| SpecificBumpPtrAllocator & | operator= (SpecificBumpPtrAllocator &&RHS) |
| size_t | getTotalMemory () const |
| Total memory held by this allocator, including slack in the slabs. | |
| 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 an array of objects without constructing them. | |
| std::optional< int64_t > | identifyObject (const void *Ptr) |
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.
Definition at line 398 of file Allocator.h.
|
inline |
Definition at line 408 of file Allocator.h.
Referenced by operator=(), and SpecificBumpPtrAllocator().
|
inline |
Definition at line 413 of file Allocator.h.
References llvm::move(), and SpecificBumpPtrAllocator().
|
inline |
Definition at line 415 of file Allocator.h.
References DestroyAll().
|
inline |
Allocate space for an array of objects without constructing them.
Definition at line 458 of file Allocator.h.
References T.
|
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 429 of file Allocator.h.
References llvm::alignAddr(), assert(), E(), llvm::End, I, llvm::Align::Of(), Size, and T.
Referenced by operator=(), and ~SpecificBumpPtrAllocator().
|
inline |
Total memory held by this allocator, including slack in the slabs.
Definition at line 424 of file Allocator.h.
|
inline |
Ptr in the given allocator. Returns an empty optional if the pointer is not found in the allocator. Definition at line 470 of file Allocator.h.
|
inline |
Definition at line 417 of file Allocator.h.
References DestroyAll(), RHS, and SpecificBumpPtrAllocator().