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

Function aligned_alloc_hook

src/mallocTracer.cpp:91–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91extern "C" void* aligned_alloc_hook(size_t alignment, size_t size) {
92 void* ret = _orig_aligned_alloc(alignment, size);
93 if (MallocTracer::running() && ret && size) {
94 MallocTracer::recordMalloc(ret, size);
95 }
96 return ret;
97}
98
99u64 MallocTracer::_interval;
100bool MallocTracer::_nofree;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected