77 using Callback = std::function<void(size_t current)>;
void enableLogging(bool enable)
Enable/disable logging.
size_t getCurrent(void)
Get the currently allocated amount of memory.
Definition: malloc_count.h:35
void resetTotal(void)
Reset the total cumulative memory allocation to zero.
void resetPeak(void)
Reset the peak memory allocation to current.
size_t getTotal(void)
Get the total cumulative memory allocation.
size_t getPeak(void)
Get the peak memory allocation.
void setCallback(Callback callback)
Set a callback function that is invoked on each change of the current allocation. ...
void setLogThreshold(size_t threshold)
Set minimum allocation size for log output (when enabled)
std::function< void(size_t current)> Callback
Callback function type.
Definition: malloc_count.h:77
void setAllocLimit(size_t maxBytes)
Set an allocation limit.
size_t getAllocCount(void)
Get the total number of allocations.