![]() |
Lumiera 0.pre.04
»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 | |
| TrackingAllocator () | |
| can be default created to attach to a common pool | |
| TrackingAllocator (Literal id) | |
| create a separate, marked memory pool | |
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. | |
| void | deallocate (Location, size_t=0) noexcept |
| Discard and forget an allocation created through this allocator. | |
| bool | manages (Location) const |
| probe if this allocator pool did allocate the given memory location | |
| size_t | getSize (Location) const |
| retrieve the registered size of this allocation, if known. | |
| HashVal | getID (Location) const |
| retrieve the internal registration ID for this allocation. | |
| Literal | poolID () const |
Additional Inherited Members | |
Public Types inherited from TrackingAllocator | |
| using | Location = void * |
Static Public Attributes inherited from TrackingAllocator | |
| static EventLog | log {"test::TrackingAllocator"} |
Static Public Member Functions inherited from TrackingAllocator | |
| static HashVal | checksum (Literal pool=GLOBAL) |
| get Checksum for specific mem-pool | |
| static size_t | use_count (Literal pool=GLOBAL) |
| determine number of active front-end handles | |
| 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 | |
|
inline |
attach to the given TrackingAllocator and MemoryPool
Definition at line 178 of file tracking-allocator.hpp.
|
inline |
create new element with an allocation registered in the backing MemoryPool
Definition at line 185 of file tracking-allocator.hpp.
References TrackingAllocator::allocate(), EventLog::call(), EventLog::error(), TrackingAllocator::log, and TrackingAllocator::poolID().
Here is the call graph for this function:
|
inlinenoexcept |
destroy the given element and discard the associated memory and registration
Definition at line 207 of file tracking-allocator.hpp.
References EventLog::call(), TrackingAllocator::deallocate(), TrackingAllocator::log, TrackingAllocator::poolID(), and EventLog::warn().
Here is the call graph for this function:can be default created to attach to a common pool
Definition at line 89 of file tracking-allocator.cpp.
| TrackingAllocator | ( | Literal | id | ) |
create a separate, marked memory pool
Definition at line 92 of file tracking-allocator.cpp.
Inheritance diagram for TrackingFactory:
Collaboration diagram for TrackingFactory: