1
0
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:
Bartosz Taudul
2017-10-16 21:13:57 +02:00
parent 2f8d3ff5eb
commit 9f28205548
2 changed files with 8 additions and 5 deletions
+1 -2
View File
@@ -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;