Macaulay2 Engine
Loading...
Searching...
No Matches
AllocLogger Class Reference

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

Detailed Description

Process-wide allocation counter used by StatsAllocator for debugging and benchmarking.

Note
AI-generated documentation. Verify against the source before relying on it.

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.


The documentation for this class was generated from the following files: