@@ -64,7 +64,7 @@ namespace snmalloc
6464 * Check whether the low memory state is still in effect. This is an
6565 * expensive operation and should not be on any fast paths.
6666 */
67- bool expensive_low_memory_check ()
67+ static bool expensive_low_memory_check ()
6868 {
6969 BOOL result;
7070 QueryMemoryResourceNotification (lowMemoryObject, &result);
@@ -113,7 +113,7 @@ namespace snmalloc
113113 }
114114
115115 // / Notify platform that we will not be using these pages
116- void notify_not_using (void * p, size_t size) noexcept
116+ static void notify_not_using (void * p, size_t size) noexcept
117117 {
118118 SNMALLOC_ASSERT (is_aligned_block<page_size>(p, size));
119119
@@ -125,7 +125,7 @@ namespace snmalloc
125125
126126 // / Notify platform that we will be using these pages
127127 template <ZeroMem zero_mem>
128- void notify_using (void * p, size_t size) noexcept
128+ static void notify_using (void * p, size_t size) noexcept
129129 {
130130 SNMALLOC_ASSERT (
131131 is_aligned_block<page_size>(p, size) || (zero_mem == NoZero));
@@ -138,7 +138,7 @@ namespace snmalloc
138138
139139 // / OS specific function for zeroing memory
140140 template <bool page_aligned = false >
141- void zero (void * p, size_t size) noexcept
141+ static void zero (void * p, size_t size) noexcept
142142 {
143143 if (page_aligned || is_aligned_block<page_size>(p, size))
144144 {
@@ -151,13 +151,13 @@ namespace snmalloc
151151 }
152152
153153# ifdef USE_SYSTEMATIC_TESTING
154- size_t & systematic_bump_ptr ()
154+ static size_t & systematic_bump_ptr ()
155155 {
156156 static size_t bump_ptr = (size_t )0x4000'0000'0000 ;
157157 return bump_ptr;
158158 }
159159
160- std::pair<void *, size_t > reserve_at_least (size_t size) noexcept
160+ static std::pair<void *, size_t > reserve_at_least (size_t size) noexcept
161161 {
162162 // Magic number for over-allocating chosen by the Pal
163163 // These should be further refined based on experiments.
@@ -183,7 +183,7 @@ namespace snmalloc
183183 }
184184# elif defined(PLATFORM_HAS_VIRTUALALLOC2)
185185 template <bool committed>
186- void * reserve_aligned (size_t size) noexcept
186+ static void * reserve_aligned (size_t size) noexcept
187187 {
188188 SNMALLOC_ASSERT (size == bits::next_pow2 (size));
189189 SNMALLOC_ASSERT (size >= minimum_alloc_size);
@@ -213,7 +213,7 @@ namespace snmalloc
213213 return ret;
214214 }
215215# else
216- std::pair<void *, size_t > reserve_at_least (size_t size) noexcept
216+ static std::pair<void *, size_t > reserve_at_least (size_t size) noexcept
217217 {
218218 SNMALLOC_ASSERT (size == bits::next_pow2 (size));
219219
0 commit comments