Expand description
Track allocations and memory use.
Structsยง
- Install this as the global allocator to get memory usage tracking.
- Atomic
Count ๐AndSize - Global
Stats ๐
Constantsยง
- Used to prevent re-entrancy when tracking allocations.
- MAX_
CALLSTACKS ๐ - MEDIUM_
SIZE ๐Allocations smaller than are stochastically sampled. - SMALL_
SIZE ๐Only track allocations of at least this size.
Staticsยง
- Statistics about extant allocations larger than
MEDIUM_SIZE
. - GLOBAL_
STATS ๐ - Statistics about some extant allocations larger than
SMALL_SIZE
but smaller thanMEDIUM_SIZE
.
Functionsยง
- Total number of live allocations, and the number of live bytes allocated as tracked by
AccountingAllocator
. - Are we doing (slightly expensive) tracking of the callstacks of large allocations?
- note_
alloc ๐ - note_
dealloc ๐ - Should we do (slightly expensive) tracking of the callstacks of large allocations?
- Gather statistics from the live tracking, if enabled.
- Turn on callstack tracking (slightly expensive) if a given env-var is set.