[*] Refactor heap stats
This commit is contained in:
parent
1fb355520e
commit
2628784ff6
@ -11,8 +11,8 @@ namespace Aurora::Memory
|
|||||||
{
|
{
|
||||||
struct HeapStats
|
struct HeapStats
|
||||||
{
|
{
|
||||||
AuUInt64 qwBytesAllocatedLifetime {};
|
AuUInt uBytesAllocatedLifetime {};
|
||||||
AuUInt64 qwBytesFreeLifetime {};
|
AuUInt uBytesFreeLifetime {};
|
||||||
|
|
||||||
AuUInt uBytesCapacity {};
|
AuUInt uBytesCapacity {};
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ namespace Aurora::Memory
|
|||||||
auto &stats = this->pHeap->GetStats();
|
auto &stats = this->pHeap->GetStats();
|
||||||
|
|
||||||
this->stats.uBytesLiveCounter = this->uBytesAllocated;
|
this->stats.uBytesLiveCounter = this->uBytesAllocated;
|
||||||
this->stats.qwBytesAllocatedLifetime = this->uBytesLifetime;
|
this->stats.uBytesAllocatedLifetime = this->uBytesLifetime;
|
||||||
this->stats.uBytesPeakCounter = this->uBytesPeak;
|
this->stats.uBytesPeakCounter = this->uBytesPeak;
|
||||||
this->stats.qwBytesFreeLifetime = this->uBytesFree;
|
this->stats.uBytesFreeLifetime = this->uBytesFree;
|
||||||
this->stats.uBytesCapacity = stats.uBytesCapacity;
|
this->stats.uBytesCapacity = stats.uBytesCapacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,10 +13,10 @@ namespace Aurora::Memory
|
|||||||
std::shared_ptr<Heap> pHeap;
|
std::shared_ptr<Heap> pHeap;
|
||||||
LeakFinderAlloc_f pAlloc;
|
LeakFinderAlloc_f pAlloc;
|
||||||
LeakFinderFree_f pFree;
|
LeakFinderFree_f pFree;
|
||||||
AuUInt64 uBytesAllocated {}; // current
|
AuUInt uBytesAllocated {}; // current
|
||||||
AuUInt64 uBytesPeak {}; // max
|
AuUInt uBytesPeak {}; // max
|
||||||
AuUInt64 uBytesFree {}; // free count
|
AuUInt uBytesFree {}; // free count
|
||||||
AuUInt64 uBytesLifetime {}; // alloc count
|
AuUInt uBytesLifetime {}; // alloc count
|
||||||
|
|
||||||
ProxyHeap(std::shared_ptr<Heap> pHeap,
|
ProxyHeap(std::shared_ptr<Heap> pHeap,
|
||||||
LeakFinderAlloc_f pAlloc = {},
|
LeakFinderAlloc_f pAlloc = {},
|
||||||
|
Loading…
Reference in New Issue
Block a user