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