From f1da7c1c859a5012897203fab4ba5887395a3985 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 20 Oct 2017 18:28:25 +0200 Subject: [PATCH] Force TLS block creation on cygwin before malloc. --- client/TracyProfiler.hpp | 2 +- client/TracyScoped.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index 24e8f30c..85efa8df 100644 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -132,10 +132,10 @@ public: { uint32_t cpu; Magic magic; + auto& token = s_token.ptr; auto ptr = (char*)tracy_malloc( size+1 ); memcpy( ptr, txt, size ); ptr[size] = '\0'; - auto& token = s_token.ptr; auto& tail = token->get_tail_index(); auto item = token->enqueue_begin( magic ); item->hdr.type = QueueType::Message; diff --git a/client/TracyScoped.hpp b/client/TracyScoped.hpp index c445eaaa..e1d76323 100644 --- a/client/TracyScoped.hpp +++ b/client/TracyScoped.hpp @@ -44,10 +44,10 @@ public: tracy_force_inline void Text( const char* txt, size_t size ) { Magic magic; + auto& token = s_token.ptr; auto ptr = (char*)tracy_malloc( size+1 ); memcpy( ptr, txt, size ); ptr[size] = '\0'; - auto& token = s_token.ptr; auto& tail = token->get_tail_index(); auto item = token->enqueue_begin( magic ); item->hdr.type = QueueType::ZoneText;