| 4314 | } |
| 4315 | |
| 4316 | void 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 | |
| 4345 | void Profiler::MemAllocNamed( const void* ptr, size_t size, bool secure, const char* name ) |
| 4346 | { |
nothing calls this directly
no test coverage detected