|
wavelength 1.0.0
|
#include "os/blockpool.h"#include "os/heaptracker.h"#include "os/prnstream.h"#include "script/dataarray.h"
Go to the source code of this file.
Functions | |
| bool | MemTrackInit () |
| Prepare the pool of AllocInfo records, when the development memory is present. | |
| void | MemTrackAddHeap (int nHeap, int *pStart, int *pEnd) |
| Track a heap, or move the end of a heap already tracked. | |
| void | MemTrackConfigure () |
| Register the script command heap_report, add the heap debug for the reports, and create the statistics tables of each tracker. | |
| void | MemTrackAlloc (int nRequested, const char *pszTag, int nActual, void *pData) |
| Record an allocation from the heap MemPushHeap() selected. | |
| 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 | MemTrackPoolAlloc (int nSize, const char *pszTag, void *pData) |
| Mark a block of the small-block pool, which lies in heap 0. | |
| void | MemTrackPoolFree (void *pData) |
| Remove the marks of a block of the small-block pool. | |
| void * | MemTrackBumpAlloc (int nBytes) |
| Take 16-byte aligned memory from the development memory above 32 MB, which nothing returns. | |
| void | MemTrackReport (int nHeap, int nMinSize, PrnStream &stream) |
| Write the time, the report of a heap, and its changes since the previous report. | |
| void | MemTrackReportByRecord (int nHeap, PrnStream &stream) |
| Write the allocations of a heap counted by record. | |
Variables | |
| constexpr int | kMemTrackMaxHeaps = 16 |
| The heaps the memory tracker can follow. | |
| HeapTracker * | g_apMemTrackHeaps [kMemTrackMaxHeaps] |
| The tracker of each heap, or null. | |
| BlockPool | g_AllocInfoPool |
| The pool of the AllocInfo records of every tracker. | |
| bool MemTrackInit | ( | ) |
Prepare the pool of AllocInfo records, when the development memory is present.
The name is inferred.
| void MemTrackAddHeap | ( | int | nHeap, |
| int * | pStart, | ||
| int * | pEnd ) |
Track a heap, or move the end of a heap already tracked.
The name is inferred.
| nHeap | The index of the heap. |
| pStart | The first word of the heap. |
| pEnd | The end of the heap. |
| void MemTrackConfigure | ( | ) |
Register the script command heap_report, add the heap debug for the reports, and create the statistics tables of each tracker.
The name is inferred.
| void MemTrackAlloc | ( | int | nRequested, |
| const char * | pszTag, | ||
| int | nActual, | ||
| void * | pData ) |
Record an allocation from the heap MemPushHeap() selected.
The name is inferred.
| nRequested | The bytes requested. |
| pszTag | The allocation tag. |
| nActual | The bytes handed out. |
| pData | The allocation. |
| void MemTrackFree | ( | int | nHeap, |
| void * | pData ) |
Remove the record of an allocation of a heap.
The name is inferred.
| nHeap | The index of the heap. |
| pData | The allocation. |
| 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.
The name is inferred.
| nHeap | The index of the heap. |
| pOld | The allocation before the change. |
| nRequested | The bytes requested, or -1 to retain them. |
| nActual | The bytes handed out, or -1 to retain them. |
| pNew | The allocation after the change. |
| void MemTrackPoolAlloc | ( | int | nSize, |
| const char * | pszTag, | ||
| void * | pData ) |
Mark a block of the small-block pool, which lies in heap 0.
The name is inferred.
| nSize | The size of the block. |
| pszTag | The tag of the block. |
| pData | The block. |
| void MemTrackPoolFree | ( | void * | pData | ) |
Remove the marks of a block of the small-block pool.
The name is inferred.
| pData | The block. |
| void * MemTrackBumpAlloc | ( | int | nBytes | ) |
Take 16-byte aligned memory from the development memory above 32 MB, which nothing returns.
The name is inferred.
| nBytes | The bytes. |
| void MemTrackReport | ( | int | nHeap, |
| int | nMinSize, | ||
| PrnStream & | stream ) |
Write the time, the report of a heap, and its changes since the previous report.
A development image writes nothing. The name is inferred.
| nHeap | The index of the heap. |
| nMinSize | The fewest bytes handed out for which a tag is listed. |
| stream | The stream to write to. |
| void MemTrackReportByRecord | ( | int | nHeap, |
| PrnStream & | stream ) |
Write the allocations of a heap counted by record.
The name is inferred.
| nHeap | The index of the heap. |
| stream | The stream to write to. |
|
constexpr |
The heaps the memory tracker can follow.
|
extern |
The tracker of each heap, or null.