Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/test/tracking-allocator.hpp"
Generic object factory backed by TrackingAllocator.
Definition at line 171 of file tracking-allocator.hpp.
Public Member Functions | |
TrackingFactory (TrackingAllocator const &anchor) | |
attach to the given TrackingAllocator and MemoryPool | |
template<class TY , typename... ARGS> | |
TY * | create (ARGS &&...args) |
create new element with an allocation registered in the backing MemoryPool | |
template<class TY > | |
void | dispose (TY *elm) noexcept |
destroy the given element and discard the associated memory and registration | |
Public Member Functions inherited from TrackingAllocator | |
TrackingAllocator () | |
can be default created to attach to a common pool | |
TrackingAllocator (Literal id) | |
create a separate, marked memory pool | |
Location | allocate (size_t n) |
Allot a memory block of given size bytes. More... | |
void | deallocate (Location, size_t=0) noexcept |
Discard and forget an allocation created through this allocator. More... | |
HashVal | getID (Location) const |
retrieve the internal registration ID for this allocation. More... | |
size_t | getSize (Location) const |
retrieve the registered size of this allocation, if known. More... | |
bool | manages (Location) const |
probe if this allocator pool did allocate the given memory location | |
Literal | poolID () const |
Additional Inherited Members | |
Public Types inherited from TrackingAllocator | |
using | Location = void * |
Static Public Member Functions inherited from TrackingAllocator | |
static HashVal | checksum (Literal pool=GLOBAL) |
get Checksum for specific mem-pool | |
static size_t | numAlloc (Literal pool=GLOBAL) |
get active allocation count for mem-pool | |
static size_t | numBytes (Literal pool=GLOBAL) |
calculate currently allotted Bytes for mem-pool | |
static size_t | use_count (Literal pool=GLOBAL) |
determine number of active front-end handles | |
Static Public Attributes inherited from TrackingAllocator | |
static EventLog | log {"test::TrackingAllocator"} |