MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / clear

Method clear

src/callTraceStorage.cpp:99–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void CallTraceStorage::clear(size_t mem_limit) {
100 while (_current_table->prev() != NULL) {
101 _current_table = _current_table->destroy();
102 }
103 _current_table->clear();
104 _used_memory = _current_table->usedMemory();
105 _allocator.clear();
106 _mem_limit = mem_limit ? mem_limit | MEM_LIMIT_EXTRA : SIZE_MAX;
107 _overflow = 0;
108}
109
110u32 CallTraceStorage::capacity() {
111 // As capacity of each subsequent table doubles,

Callers

nothing calls this directly

Calls 3

prevMethod · 0.80
destroyMethod · 0.45
usedMemoryMethod · 0.45

Tested by

no test coverage detected