summaryrefslogtreecommitdiffstats
path: root/runtime/mem_map.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-06-25 11:52:14 -0700
committerIan Rogers <irogers@google.com>2014-06-25 11:55:07 -0700
commitc3ccc1039e0bbc0744f958cb8719cf96bce5b853 (patch)
tree46be84eae8aba7f1698415752262bc16da72aab6 /runtime/mem_map.h
parent3153895d020038cd89311ed6ee241ce9b9f18a59 (diff)
downloadart-c3ccc1039e0bbc0744f958cb8719cf96bce5b853.zip
art-c3ccc1039e0bbc0744f958cb8719cf96bce5b853.tar.gz
art-c3ccc1039e0bbc0744f958cb8719cf96bce5b853.tar.bz2
Fix the Mac build on x86-64.
Change-Id: I4ed3783a96d844de0b0a295df26d0a48c02a3726
Diffstat (limited to 'runtime/mem_map.h')
-rw-r--r--runtime/mem_map.h10
1 files changed, 8 insertions, 2 deletions
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 @@ class MemMap {
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()).