53 currentMemUsage += size;
54 if (currentMemUsage > maxMemUsage)
55 maxMemUsage = currentMemUsage;
void resetMemUsage()
Reset mem usage and max mem usage to 0.
Definition: MemUsage.h:68
int64_t getMaxMemUsage() const
Get max mem usage.
Definition: MemUsage.h:78
Class that tracks memory usage (mainly of send and receive buffers).
Definition: MemUsage.h:38
MemUsageTracker()
Default constructor initializes everything to 0.
Definition: MemUsage.h:45
void incrementMemUsage(uint64_t size)
Increment memory usage.
Definition: MemUsage.h:52
void decrementMemUsage(uint64_t size)
Decrement memory usage.
Definition: MemUsage.h:63