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

Method recordMalloc

src/mallocTracer.cpp:214–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void MallocTracer::recordMalloc(void* address, size_t size) {
215 if (updateCounter(_allocated_bytes, size, _interval)) {
216 MallocEvent event;
217 event._start_time = TSC::ticks();
218 event._address = (uintptr_t)address;
219 event._size = size;
220
221 Profiler::instance()->recordSample(NULL, size, MALLOC_SAMPLE, &event);
222 }
223}
224
225void MallocTracer::recordFree(void* address) {
226 MallocEvent event;

Callers

nothing calls this directly

Calls 1

recordSampleMethod · 0.80

Tested by

no test coverage detected