From ae05ed4dfdd522742dcc02dc1d1d4184b35eb1a5 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Thu, 15 Aug 2019 11:25:07 +0100 Subject: [PATCH 1/2] default_memory_provider is a function now. --- src/mem/pool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/pool.h b/src/mem/pool.h index f180b9c..2736c56 100644 --- a/src/mem/pool.h +++ b/src/mem/pool.h @@ -41,7 +41,7 @@ namespace snmalloc static Pool* make() noexcept { - return make(default_memory_provider); + return Pool::make(default_memory_provider()); } template From 4827b7615bb031c0f141eecc1f056bf05fbb9379 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Thu, 15 Aug 2019 11:25:23 +0100 Subject: [PATCH 2/2] Fix inline statics in Pal_Windows. --- src/pal/pal_windows.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pal/pal_windows.h b/src/pal/pal_windows.h index 3b12b62..12f21eb 100644 --- a/src/pal/pal_windows.h +++ b/src/pal/pal_windows.h @@ -22,13 +22,13 @@ namespace snmalloc /** * The number of times that the memory pressure notification has fired. */ - static std::atomic pressure_epoch; + static inline std::atomic pressure_epoch; /** * A flag indicating that we have tried to register for low-memory * notifications. */ - static std::atomic registered_for_notifications; - static HANDLE lowMemoryObject; + static inline std::atomic registered_for_notifications; + static inline HANDLE lowMemoryObject; /** * Callback, used when the system delivers a low-memory notification. This * simply increments an atomic counter each time the notification is raised. @@ -231,8 +231,5 @@ namespace snmalloc } # endif }; - inline std::atomic PALWindows::pressure_epoch; - inline std::atomic PALWindows::registered_for_notifications; - inline HANDLE PALWindows::lowMemoryObject; } #endif