mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Use custom threading wrapper instead of std::thread.
std::thread may perform memory allocation when a thread is created (it does so on MSVC). Tracy heap is managed by its own allocator and this changes prevents accessing application heap.
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
#include <chrono>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <thread>
|
||||
|
||||
#include "concurrentqueue.h"
|
||||
#include "../common/tracy_lz4.hpp"
|
||||
@@ -163,6 +162,7 @@ public:
|
||||
static bool ShouldExit();
|
||||
|
||||
private:
|
||||
static void LaunchWorker( void* ptr ) { ((Profiler*)ptr)->Worker(); }
|
||||
void Worker();
|
||||
|
||||
bool SendData( const char* data, size_t len );
|
||||
@@ -180,7 +180,6 @@ private:
|
||||
int64_t m_timeBegin;
|
||||
uint64_t m_mainThread;
|
||||
uint64_t m_epoch;
|
||||
std::thread m_thread;
|
||||
std::atomic<bool> m_shutdown;
|
||||
std::unique_ptr<Socket> m_sock;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user