File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1111#include < pcg_random.hpp>
1212#include < Common/thread_local_rng.h>
1313
14- #if USE_JEMALLOC
14+ #if defined( USE_JEMALLOC) && (USE_JEMALLOC)
1515# include < jemalloc/jemalloc.h>
1616#else
1717# if !defined(OS_DARWIN) && !defined(OS_FREEBSD)
@@ -134,7 +134,7 @@ class Allocator
134134 {
135135 // / Resize malloc'd memory region with no special alignment requirement.
136136 CurrentMemoryTracker::realloc (old_size, new_size);
137- #if USE_JEMALLOC
137+ #if defined( USE_JEMALLOC) && (USE_JEMALLOC)
138138 void * new_buf = je_realloc (buf, new_size);
139139#else
140140 void * new_buf = ::realloc (buf, new_size);
@@ -228,7 +228,7 @@ class Allocator
228228 {
229229 if (alignment <= MALLOC_MIN_ALIGNMENT)
230230 {
231- #if USE_JEMALLOC
231+ #if defined( USE_JEMALLOC) && (USE_JEMALLOC)
232232 if constexpr (clear_memory)
233233 buf = je_calloc (size, 1 );
234234 else
@@ -267,7 +267,7 @@ class Allocator
267267 }
268268 else
269269 {
270- #if USE_JEMALLOC
270+ #if defined( USE_JEMALLOC) && (USE_JEMALLOC)
271271 je_free (buf);
272272#else
273273 ::free (buf);
You can’t perform that action at this time.
0 commit comments