MCPcopy Create free account
hub / github.com/SmingHub/Sming / inc_count

Function inc_count

Sming/Components/malloc_count/malloc_count.cpp:129–141  ·  view source on GitHub ↗

add allocation to statistics */

Source from the content-addressed store, hash-verified

127
128/* add allocation to statistics */
129void inc_count(size_t inc)
130{
131 stats.current += inc;
132 stats.total += inc;
133 if(stats.current > stats.peak) {
134 stats.peak = stats.current;
135 }
136 ++stats.count;
137
138 if(userCallback) {
139 userCallback(stats.current);
140 }
141}
142
143/* decrement allocation to statistics */
144void dec_count(size_t dec)

Callers 2

mc_mallocFunction · 0.85
mc_reallocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected