|
Macaulay2 Engine
|
Process-wide allocation counter used by StatsAllocator for debugging and benchmarking. More...
#include <myalloc.hpp>
Static Public Member Functions | |
| static void | reset () |
| static void | logAlloc (size_t num, size_t sz) |
| static void | logDealloc (size_t num, size_t sz) |
Static Public Attributes | |
| static size_t | mNumAllocs = 0 |
| static size_t | mAllocSize = 0 |
| static size_t | mNumDeallocs = 0 |
| static long | mCurrentAllocSize = 0 |
| static size_t | mHighWater = 0 |
Process-wide allocation counter used by StatsAllocator for debugging and benchmarking.
All counters (mNumAllocs, mAllocSize, mNumDeallocs, mCurrentAllocSize, mHighWater) are static, so the logger tracks every StatsAllocator-mediated allocation in the process at once. logAlloc / logDealloc are called from the allocator hooks; reset() zeroes everything for a fresh measurement. Not thread-safe — intended only for diagnostic runs.
Definition at line 62 of file myalloc.hpp.