MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / MemFreeCallstack

Method MemFreeCallstack

Source/ThirdParty/tracy/client/TracyProfiler.cpp:4316–4343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4314}
4315
4316void Profiler::MemFreeCallstack( const void* ptr, int depth, bool secure )
4317{
4318 if( secure && !ProfilerAvailable() ) return;
4319 if( !ProfilerAllocatorAvailable() )
4320 {
4321 MemFree( ptr, secure );
4322 return;
4323 }
4324 if( depth > 0 && has_callstack() )
4325 {
4326 auto& profiler = GetProfiler();
4327# ifdef TRACY_ON_DEMAND
4328 if( !profiler.IsConnected() ) return;
4329# endif
4330 const auto thread = GetThreadHandle();
4331
4332 auto callstack = Callstack( depth );
4333
4334 profiler.m_serialLock.lock();
4335 SendCallstackSerial( callstack );
4336 SendMemFree( QueueType::MemFreeCallstack, thread, ptr );
4337 profiler.m_serialLock.unlock();
4338 }
4339 else
4340 {
4341 MemFree( ptr, secure );
4342 }
4343}
4344
4345void Profiler::MemAllocNamed( const void* ptr, size_t size, bool secure, const char* name )
4346{

Callers

nothing calls this directly

Calls 9

ProfilerAvailableFunction · 0.85
has_callstackFunction · 0.85
CallstackFunction · 0.85
SendCallstackSerialFunction · 0.85
SendMemFreeFunction · 0.85
GetThreadHandleFunction · 0.70
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected