From 030f45801786e8b943b966c752804f0c7d9857b1 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Mon, 3 Dec 2018 09:15:30 -0800 Subject: [PATCH] add vs2013 specific def for thread local Signed-off-by: Nikolaj Bjorner --- src/util/memory_manager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util/memory_manager.cpp b/src/util/memory_manager.cpp index 5d494834e..1be76728c 100644 --- a/src/util/memory_manager.cpp +++ b/src/util/memory_manager.cpp @@ -241,8 +241,15 @@ void * memory::allocate(char const* file, int line, char const* obj, size_t s) { // when the local counter > SYNCH_THRESHOLD #define SYNCH_THRESHOLD 100000 +#ifdef _WINDOWS +// This is VS2013 specific instead of Windows specific. +// It can go away with VS2017 builds +__declspec(thread) long long g_memory_thread_alloc_size = 0; +__declspec(thread) long long g_memory_thread_alloc_count = 0; +#else thread_local long long g_memory_thread_alloc_size = 0; thread_local long long g_memory_thread_alloc_count = 0; +#endif static void synchronize_counters(bool allocating) { #ifdef PROFILE_MEMORY