52 void Alloc(
int size,
const char *type,
int actual,
void *ptr);
62 void PoolAlloc(
int size,
const char *type,
void *ptr);
71 void Free(
void *ptr,
bool pooled);
112 return mMemMirror != NULL;
122 AllocInfo **MirrorSlot(
void *ptr)
const {
123 return mMemMirror + (
static_cast<int *
>(ptr) - mHeapBegin);
130 AllocInfo **mMemMirror;
138 BlockStatTable *mStats[2];
139 BlockStatTable *mPoolStats[2];
141 unsigned char mReserved44[0xa0];
void MemTrackReportAllocsByName(int heap, PrnStream &stream)
Print how many allocations of a heap share each name and size.
bool MemTrackEnabled()
Report whether allocation tracking is built in.
void MemTrackPoolAlloc(int size, const char *type, void *ptr)
Record a pool node in the main heap's tracker.
void MemTrackPoolFree(void *ptr)
Forget a pool node.
void DataHeapReport(DataArray *args, void *data)
Run the heap_report script command.
void MemTrackReport(int heap, int minSize, PrnStream &stream)
Print a heap's report and its change since the previous one, after the date and time.
void MemTrackFree(int heap, void *ptr)
Forget a heap allocation.
void MemTrackAlloc(int size, const char *type, int actual, void *ptr)
Record a heap allocation in the current heap's tracker.
void MemTrackDataInit()
Add the debug heap the tracker's own containers use and register the heap_report command.
Record of one tracked allocation: its sizes, its tags, and the call stack that made it.
Definition allocinfo.h:11
Reference-counted array of script data nodes.
Definition dataarray.h:20
void SetHeapRange(int *heapBegin, int *heapEnd)
Follow a heap that grew or shrank.
void PoolAlloc(int size, const char *type, void *ptr)
Record a pool node.
int BytesFree() const
Report the bytes of the heap not allocated.
void ReportAllocsByName(PrnStream &stream)
Print how many allocations share each name and size.
void Free(void *ptr, bool pooled)
Forget an allocation or a pool node.
void CreateStatTables()
Create the statistics tables.
void Report(PrnStream &stream, int minSize)
Print the heap's totals and its allocations by name.
MemTrack(int heap, int *begin, int *end)
Start tracking a heap.
bool InitOK() const
Report whether the mirror array was allocated.
Definition MemTrack.h:111
void Alloc(int size, const char *type, int actual, void *ptr)
Record a heap allocation.
void DiffReport(PrnStream &stream)
Print the change of every total since the previous report, then swap the tables.
Text output stream.
Definition prnstream.h:16
bool MemTrackInit()
Prepare the pool of AllocInfo records, when the development memory is present.