Table of allocation totals by tag, filled from a HeapTracker for a report.
More...
#include <blockstattable.h>
|
| | BlockStatTable (int bSeparateSizes) |
| | Construct an empty table.
|
| void | Clear () |
| | Empty the table.
|
| BlockStat * | GetStat (int nIndex) |
| | Report a row.
|
| void | Update (const char *pszName, int nRequested, int nActual) |
| | Add an allocation to the row of its tag, adding the row when the tag is new.
|
| void | SortBySize () |
| | Sort the rows by bytes handed out, largest first.
|
| void | SortByName () |
| | Sort the rows by tag.
|
| int | GetCount () const |
| | BlockStatTable (bool separateSizes) |
| | Create an empty table.
|
| void | Clear () |
| | Empty the table.
|
| BlockStat & | GetBlockStat (int iStat) |
| | Report a total.
|
| void | Update (const char *name, int sizeReq, int sizeActual) |
| | Add an allocation to the total of its name, starting a total when none matches.
|
| void | SortBySize () |
| | Sort the totals by bytes allocated, largest first.
|
| void | SortByName () |
| | Sort the totals by name.
|
| int | NumStats () const |
| | Report the number of totals.
|
|
| static constexpr int | kCapacity = 1024 |
| | The rows a table has room for.
|
Table of allocation totals by tag, filled from a HeapTracker for a report.
Table of per-name allocation totals.
The class is not polymorphic. The name is the one the overflow warning gives.
The object is 0x500c bytes. The name comes from the message Update() fails with.
◆ anonymous enum
◆ BlockStatTable() [1/2]
| BlockStatTable::BlockStatTable |
( |
int | bSeparateSizes | ) |
|
|
explicit |
Construct an empty table.
- Parameters
-
| bSeparateSizes | Non-zero to give each request size of a tag a separate row. |
- Ghidra address:
- NTSC-U/C: 0x0029c7b0
- Ghidra address:
- PAL: 0x002a63d8
◆ BlockStatTable() [2/2]
| BlockStatTable::BlockStatTable |
( |
bool | separateSizes | ) |
|
|
explicit |
Create an empty table.
- Parameters
-
| separateSizes | Whether allocations of one name and different sizes get separate totals. |
- Ghidra address:
- 0x1001ab70
◆ operator new()
| void * BlockStatTable::operator new |
( |
size_t | nSize | ) |
|
|
static |
Take a table from the memory tracker's own region.
- Parameters
-
| nSize | The size of the table. |
- Returns
- The table.
◆ operator delete()
| void BlockStatTable::operator delete |
( |
void * | | ) |
|
|
inlinestaticnoexcept |
Ignore the release of a table.
The memory tracker's region never takes memory back.
◆ Clear() [1/2]
| void BlockStatTable::Clear |
( |
| ) |
|
Empty the table.
- Ghidra address:
- NTSC-U/C: 0x0029c7c8
- Ghidra address:
- PAL: 0x002a63f0
◆ GetStat()
| BlockStat * BlockStatTable::GetStat |
( |
int | nIndex | ) |
|
Report a row.
- Parameters
-
- Returns
- The row.
- Ghidra address:
- NTSC-U/C: 0x0029c7d0
- Ghidra address:
- PAL: 0x002a63f8
◆ Update() [1/2]
| void BlockStatTable::Update |
( |
const char * | pszName, |
|
|
int | nRequested, |
|
|
int | nActual ) |
Add an allocation to the row of its tag, adding the row when the tag is new.
A full table reports an overflow through DebugWarn().
- Parameters
-
| pszName | The tag. |
| nRequested | The bytes requested. |
| nActual | The bytes handed out. |
- Ghidra address:
- NTSC-U/C: 0x0029c7e0
- Ghidra address:
- PAL: 0x002a6408
◆ SortBySize() [1/2]
| void BlockStatTable::SortBySize |
( |
| ) |
|
Sort the rows by bytes handed out, largest first.
- Ghidra address:
- NTSC-U/C: 0x0029c980
- Ghidra address:
- PAL: 0x002a65a8
◆ SortByName() [1/2]
| void BlockStatTable::SortByName |
( |
| ) |
|
Sort the rows by tag.
- Ghidra address:
- NTSC-U/C: 0x0029c9b0
- Ghidra address:
- PAL: 0x002a65d8
◆ PrintDelta()
Write the differences between the rows of two tables sorted by tag.
Rows past the end of the shorter table are left out.
- Parameters
-
| stream | The stream to write to. |
| pCurrent | The newer table. |
| pPrevious | The older table. |
- Ghidra address:
- NTSC-U/C: 0x0029c110
- Ghidra address:
- PAL: 0x002a5d30
◆ GetCount()
| int BlockStatTable::GetCount |
( |
| ) |
const |
|
inline |
◆ Clear() [2/2]
| void BlockStatTable::Clear |
( |
| ) |
|
Empty the table.
- Ghidra address:
- 0x1001aba0
◆ GetBlockStat()
| BlockStat & BlockStatTable::GetBlockStat |
( |
int | iStat | ) |
|
Report a total.
- Parameters
-
- Returns
- The total.
- Ghidra address:
- 0x1001abb0
◆ Update() [2/2]
| void BlockStatTable::Update |
( |
const char * | name, |
|
|
int | sizeReq, |
|
|
int | sizeActual ) |
Add an allocation to the total of its name, starting a total when none matches.
- Parameters
-
| name | The allocation's name. |
| sizeReq | The bytes requested. |
| sizeActual | The bytes allocated. |
- Ghidra address:
- 0x1001abf0
◆ SortBySize() [2/2]
| void BlockStatTable::SortBySize |
( |
| ) |
|
Sort the totals by bytes allocated, largest first.
- Ghidra address:
- 0x1001ad50
◆ SortByName() [2/2]
| void BlockStatTable::SortByName |
( |
| ) |
|
Sort the totals by name.
- Ghidra address:
- 0x1001b0c0
◆ NumStats()
| int BlockStatTable::NumStats |
( |
| ) |
const |
|
inline |
Report the number of totals.
- Returns
- The number of totals.
◆ kCapacity
| int BlockStatTable::kCapacity = 1024 |
|
staticconstexpr |
The rows a table has room for.
The documentation for this class was generated from the following files: