73void MemTrackAlloc(
int nRequested,
const char *pszTag,
int nActual,
void *pData);
Pool of equal blocks carved from a region, each free block linking to the next.
Definition blockpool.h:9
Tracker of the allocations of one heap, with one AllocInfo slot for each word of the heap.
Definition heaptracker.h:15
Text output stream.
Definition prnstream.h:16
void MemTrackFree(int nHeap, void *pData)
Remove the record of an allocation of a heap.
void MemTrackRealloc(int nHeap, void *pOld, int nRequested, int nActual, void *pNew)
Move the record of an allocation of a heap that changed size or address.
void MemTrackReportByRecord(int nHeap, PrnStream &stream)
Write the allocations of a heap counted by record.
void MemTrackPoolFree(void *pData)
Remove the marks of a block of the small-block pool.
constexpr int kMemTrackMaxHeaps
The heaps the memory tracker can follow.
Definition memtrack.h:9
void MemTrackPoolAlloc(int nSize, const char *pszTag, void *pData)
Mark a block of the small-block pool, which lies in heap 0.
void MemTrackReport(int nHeap, int nMinSize, PrnStream &stream)
Write the time, the report of a heap, and its changes since the previous report.
bool MemTrackInit()
Prepare the pool of AllocInfo records, when the development memory is present.
void MemTrackAlloc(int nRequested, const char *pszTag, int nActual, void *pData)
Record an allocation from the heap MemPushHeap() selected.
void MemTrackConfigure()
Register the script command heap_report, add the heap debug for the reports, and create the statistic...
void MemTrackAddHeap(int nHeap, int *pStart, int *pEnd)
Track a heap, or move the end of a heap already tracked.
void * MemTrackBumpAlloc(int nBytes)
Take 16-byte aligned memory from the development memory above 32 MB, which nothing returns.
HeapTracker * g_apMemTrackHeaps[kMemTrackMaxHeaps]
The tracker of each heap, or null.
BlockPool g_AllocInfoPool
The pool of the AllocInfo records of every tracker.