mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
add vs2013 specific def for thread local
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
226497e530
commit
030f458017
1 changed files with 7 additions and 0 deletions
|
@ -241,8 +241,15 @@ void * memory::allocate(char const* file, int line, char const* obj, size_t s) {
|
||||||
// when the local counter > SYNCH_THRESHOLD
|
// when the local counter > SYNCH_THRESHOLD
|
||||||
#define SYNCH_THRESHOLD 100000
|
#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_size = 0;
|
||||||
thread_local long long g_memory_thread_alloc_count = 0;
|
thread_local long long g_memory_thread_alloc_count = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
static void synchronize_counters(bool allocating) {
|
static void synchronize_counters(bool allocating) {
|
||||||
#ifdef PROFILE_MEMORY
|
#ifdef PROFILE_MEMORY
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue