From c426ab4ea2c0be6257409be2c35afda5c87c42f9 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Mon, 1 Feb 2021 15:41:41 -0800 Subject: [PATCH] add condition to avoid compilation error on vs2015 (#issue 353) --- src/heap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/heap.c b/src/heap.c index a9799dde..275af755 100644 --- a/src/heap.c +++ b/src/heap.c @@ -359,7 +359,9 @@ static void mi_heap_absorb(mi_heap_t* heap, mi_heap_t* from) { // turns out to be ok as `_mi_heap_delayed_free` only visits the list and calls a // the regular `_mi_free_delayed_block` which is safe. _mi_heap_delayed_free(from); + #if !defined(_MSC_VER) || (_MSC_VER > 1900) // somehow the following line gives an error in VS2015, issue #353 mi_assert_internal(mi_atomic_load_ptr_relaxed(mi_block_t,&from->thread_delayed_free) == NULL); + #endif // and reset the `from` heap mi_heap_reset_pages(from);