43 static void *
operator new(
size_t nSize);
48 static void operator delete(
void *)
noexcept {
81 void Alloc(
int nRequested,
const char *pszTag,
int nActual,
void *pData);
93 void Realloc(
void *pOld,
int nRequested,
int nActual,
void *pNew);
104 void PoolAlloc(
int nSize,
const char *pszTag,
void *pData);
114 void Free(
void *pData,
bool bPool);
172 int mAllocsThisFrame;
Record of one tracked allocation: its sizes, its tags, and the call stack that made it.
Definition allocinfo.h:11
Table of allocation totals by tag, filled from a HeapTracker for a report.
Definition blockstattable.h:21
HeapTracker(int nHeap, int *pStart, int *pEnd)
Track a heap, with a cleared slot for each word.
void CreateTables()
Create the two pairs of statistics tables the reports fill.
void PoolAlloc(int nSize, const char *pszTag, void *pData)
Mark the record at an address as a pool block, creating the record when there is none.
void Poll()
Store the counts of the frame in the history and start new ones.
void Free(void *pData, bool bPool)
Remove the record of an allocation, or only its pool block marks.
void SetRange(int *pStart, int *pEnd)
Move the end of the heap after the heap was resized.
void Alloc(int nRequested, const char *pszTag, int nActual, void *pData)
Record an allocation.
void Report(PrnStream &stream, int nMinSize)
Write the totals of the heap and the totals of each tag.
void Realloc(void *pOld, int nRequested, int nActual, void *pNew)
Move the record of an allocation that changed size or address.
static constexpr int kHistorySize
The frames of allocation counts Poll() retains.
Definition heaptracker.h:18
void ReportByRecord(PrnStream &stream)
Write the number of allocations with each distinct record, using the heap "debug" for the report's ow...
void ReportDiff(PrnStream &stream)
Write the changes of each tag since the previous report, and switch tables.
int FreeBytes()
Report the bytes of the heap not handed out.
Text output stream.
Definition prnstream.h:16
Allocations and frees of one frame.
Definition heaptracker.h:21
int mAllocs
Definition heaptracker.h:22
int mFrees
Definition heaptracker.h:23