|
wavelength 1.0.0
|
Record of one tracked allocation: its sizes, its tags, and the call stack that made it. More...
#include <allocinfo.h>
Public Member Functions | |
| void | CaptureStack () |
| Record the return addresses of the caller's caller and the callers above it. | |
| void | Print (PrnStream &stream) const |
| Write the tag, the size, and the call stack of the record. | |
| int | GetSizeRequested () const |
| void | SetSizeRequested (int nSizeRequested) |
| int | GetSizeActual () const |
| void | SetSizeActual (int nSizeActual) |
| const char * | GetTag () const |
| void | SetTag (const char *pszTag) |
| const char * | GetPoolTag () const |
| void | SetPoolTag (const char *pszPoolTag) |
| int | GetPoolSize () const |
| void | SetPoolSize (int nPoolSize) |
| void | Print (PrnStream &stream) const |
| Print the pool name and node size, or else the name and requested size. | |
| bool | operator< (const AllocInfo &other) const |
| Order by requested size, pool node size, name, and pool name. | |
Static Public Member Functions | |
| static bool | Less (const AllocInfo *pFirst, const AllocInfo *pSecond) |
| Order records by size, pool size, call stack, tag, and pool tag. | |
Public Attributes | |
| int | mSizeReq |
| const char * | mName |
| const char * | mPoolName |
Static Public Attributes | |
| static constexpr int | kStackSize = 24 |
| The return addresses a record stores. | |
Record of one tracked allocation: its sizes, its tags, and the call stack that made it.
What the memory tracker knows about one allocation.
The class is not polymorphic. The name is inferred. The records come from a BlockPool of 116-byte blocks, and a HeapTracker indexes them by the address of the allocation.
The object is 0x14 bytes and comes from a pool. A heap allocation that a pool carves into nodes records the pool's name as well. The name is inferred from the memory tracker's assertions.
| void AllocInfo::CaptureStack | ( | ) |
Record the return addresses of the caller's caller and the callers above it.
| void AllocInfo::Print | ( | PrnStream & | stream | ) | const |
Write the tag, the size, and the call stack of the record.
| stream | The stream to write to. |
Order records by size, pool size, call stack, tag, and pool tag.
The tags compare as greater only when strcmp() reports exactly 1.
| pFirst | The first record. |
| pSecond | The second record. |
|
inline |
|
inline |
| nSizeRequested | The bytes the caller requested, 0 for a pool block. |
|
inline |
|
inline |
| nSizeActual | The bytes the heap handed out. |
|
inline |
|
inline |
| pszTag | The allocation tag, or null for a pool block. |
|
inline |
|
inline |
| pszPoolTag | The tag of the pool block at the address, or null. |
|
inline |
|
inline |
| nPoolSize | The size of the pool block at the address. |
| void AllocInfo::Print | ( | PrnStream & | stream | ) | const |
Print the pool name and node size, or else the name and requested size.
| stream | The destination. |
| bool AllocInfo::operator< | ( | const AllocInfo & | other | ) | const |
Order by requested size, pool node size, name, and pool name.
| other | The other record. |
|
staticconstexpr |
The return addresses a record stores.
The last one is always cleared.
| int AllocInfo::mSizeReq |
Bytes requested from the heap.
| const char* AllocInfo::mName |
Name of the heap allocation, or null for a pool node alone.
| const char* AllocInfo::mPoolName |
Name of the pool node, or null.