![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
registration and tracking of memory allocations handed out.
Definition at line 58 of file tracking-allocator.cpp.
Classes | |
| struct | Allocation |
| registration entry to maintain a single allocation More... | |
| struct | LocationHash |
Public Member Functions | |
| MemoryPool (Literal id) | |
| Allocation & | addAlloc (size_t bytes) |
| void | discardAlloc (void *loc, size_t) |
| Allocation const * | findAlloc (Location) const |
| HashVal | getChecksum () const |
| size_t | getAllocationCnt () const |
| size_t | calcAllocSize () const |
| Literal | getPoolID () const |
Private Types | |
| using | Location = void * |
| using | AllocTab = std::unordered_map< const Location, Allocation, LocationHash > |
Private Attributes | |
| Literal | poolID_ |
| AllocTab | allocs_ |
| HashVal | checksum_ |
| size_t | entryNr_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
|
inline |
Definition at line 85 of file tracking-allocator.cpp.
|
private |
Definition at line 62 of file tracking-allocator.cpp.
|
private |
Definition at line 76 of file tracking-allocator.cpp.
| MemoryPool::Allocation & addAlloc | ( | size_t | bytes | ) |
Definition at line 208 of file tracking-allocator.cpp.
References UninitialisedDynBlock< T >::allocate(), MemoryPool::allocs_, MemoryPool::Allocation::buff, MemoryPool::checksum_, MemoryPool::Allocation::entryID, MemoryPool::entryNr_, UninitialisedDynBlock< T >::front(), and MemoryPool::poolID_.
Here is the call graph for this function:| void discardAlloc | ( | void * | loc, |
| size_t | bytes | ||
| ) |
Definition at line 222 of file tracking-allocator.cpp.
References MemoryPool::allocs_, MemoryPool::checksum_, and MemoryPool::poolID_.
| MemoryPool::Allocation const * findAlloc | ( | Location | loc | ) | const |
Definition at line 242 of file tracking-allocator.cpp.
References MemoryPool::allocs_.
| HashVal getChecksum | ( | ) | const |
Definition at line 250 of file tracking-allocator.cpp.
References MemoryPool::checksum_.
| size_t getAllocationCnt | ( | ) | const |
Definition at line 256 of file tracking-allocator.cpp.
References MemoryPool::allocs_.
| size_t calcAllocSize | ( | ) | const |
Definition at line 262 of file tracking-allocator.cpp.
References MemoryPool::allocs_, and lib::explore().
Here is the call graph for this function:
|
inline |
Definition at line 101 of file tracking-allocator.cpp.
References MemoryPool::poolID_.
|
private |
Definition at line 79 of file tracking-allocator.cpp.
Referenced by MemoryPool::addAlloc(), MemoryPool::discardAlloc(), and MemoryPool::getPoolID().
|
private |
Definition at line 80 of file tracking-allocator.cpp.
Referenced by MemoryPool::addAlloc(), MemoryPool::calcAllocSize(), MemoryPool::discardAlloc(), MemoryPool::findAlloc(), and MemoryPool::getAllocationCnt().
|
private |
Definition at line 81 of file tracking-allocator.cpp.
Referenced by MemoryPool::addAlloc(), MemoryPool::discardAlloc(), and MemoryPool::getChecksum().
|
private |
Definition at line 82 of file tracking-allocator.cpp.
Referenced by MemoryPool::addAlloc().
Inheritance diagram for MemoryPool:
Collaboration diagram for MemoryPool: