malloc_count.h File Reference
#include <stdlib.h>
#include <stdbool.h>
#include <functional>
Include dependency graph for malloc_count.h:
Go to the source code of this file.
Namespaces | |
MallocCount | |
Typedefs | |
using | MallocCount::Callback = std::function< void(size_t current)> |
Callback function type. More... | |
Functions | |
size_t | MallocCount::getCurrent (void) |
Get the currently allocated amount of memory. More... | |
size_t | MallocCount::getPeak (void) |
Get the peak memory allocation. More... | |
void | MallocCount::resetPeak (void) |
Reset the peak memory allocation to current. More... | |
size_t | MallocCount::getTotal (void) |
Get the total cumulative memory allocation. More... | |
void | MallocCount::resetTotal (void) |
Reset the total cumulative memory allocation to zero. More... | |
size_t | MallocCount::getAllocCount (void) |
Get the total number of allocations. More... | |
void | MallocCount::setAllocLimit (size_t maxBytes) |
Set an allocation limit. More... | |
void | MallocCount::setCallback (Callback callback) |
Set a callback function that is invoked on each change of the current allocation. More... | |
void | MallocCount::enableLogging (bool enable) |
Enable/disable logging. More... | |
void | MallocCount::setLogThreshold (size_t threshold) |
Set minimum allocation size for log output (when enabled) More... | |