Fix the Mac build on x86-64.
Change-Id: I4ed3783a96d844de0b0a295df26d0a48c02a3726
diff --git a/runtime/mem_map.h b/runtime/mem_map.h
index e42251c..defa6a5 100644
--- a/runtime/mem_map.h
+++ b/runtime/mem_map.h
@@ -30,6 +30,12 @@
namespace art {
+#if defined(__LP64__) && (!defined(__x86_64__) || defined(__APPLE__))
+#define USE_ART_LOW_4G_ALLOCATOR 1
+#else
+#define USE_ART_LOW_4G_ALLOCATOR 0
+#endif
+
#ifdef __linux__
static constexpr bool kMadviseZeroes = true;
#else
@@ -147,8 +153,8 @@
size_t base_size_; // Length of mapping. May be changed by RemapAtEnd (ie Zygote).
int prot_; // Protection of the map.
-#if defined(__LP64__) && !defined(__x86_64__)
- static uintptr_t next_mem_pos_; // next memory location to check for low_4g extent
+#if USE_ART_LOW_4G_ALLOCATOR
+ static uintptr_t next_mem_pos_; // Next memory location to check for low_4g extent.
#endif
// All the non-empty MemMaps. Use a multimap as we do a reserve-and-divide (eg ElfMap::Load()).