From 7deb3b61da1cd8f4ae50cc12623e22696bd1317e Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Wed, 6 Oct 2021 14:01:44 +0100 Subject: [PATCH] Fix builds on MSVC 2016 Without this it complains that LocalCache's constructor can't be constexpr because small_fast_free_lists isn't initialized. It's not clear to me why it didn't mind before, and nobody else seems to mind now, but this shouldn't break anyone else, either. --- src/mem/localcache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/localcache.h b/src/mem/localcache.h index 0f54dc7..4d3d55a 100644 --- a/src/mem/localcache.h +++ b/src/mem/localcache.h @@ -51,7 +51,7 @@ namespace snmalloc // allocation on the fast path. This part of the code is inspired by // mimalloc. FreeListIter - small_fast_free_lists[NUM_SIZECLASSES]; + small_fast_free_lists[NUM_SIZECLASSES] = {}; // This is the entropy for a particular thread. LocalEntropy entropy;