Merge "Don't use ashmen when kIsTargetLinux is set."
diff --git a/runtime/mem_map.cc b/runtime/mem_map.cc
index 1ec59b3..6da72e4 100644
--- a/runtime/mem_map.cc
+++ b/runtime/mem_map.cc
@@ -282,6 +282,7 @@
#ifndef __LP64__
UNUSED(low_4gb);
#endif
+ use_ashmem = use_ashmem && !kIsTargetLinux;
if (byte_count == 0) {
return new MemMap(name, nullptr, 0, nullptr, 0, prot, false);
}
@@ -522,6 +523,7 @@
MemMap* MemMap::RemapAtEnd(uint8_t* new_end, const char* tail_name, int tail_prot,
std::string* error_msg, bool use_ashmem) {
+ use_ashmem = use_ashmem && !kIsTargetLinux;
DCHECK_GE(new_end, Begin());
DCHECK_LE(new_end, End());
DCHECK_LE(begin_ + size_, reinterpret_cast<uint8_t*>(base_begin_) + base_size_);
diff --git a/runtime/mem_map.h b/runtime/mem_map.h
index 049ae12..0fea1a5 100644
--- a/runtime/mem_map.h
+++ b/runtime/mem_map.h
@@ -68,7 +68,7 @@
bool low_4gb,
bool reuse,
std::string* error_msg,
- bool use_ashmem = !kIsTargetLinux);
+ bool use_ashmem = true);
// Create placeholder for a region allocated by direct call to mmap.
// This is useful when we do not have control over the code calling mmap,
@@ -172,7 +172,7 @@
const char* tail_name,
int tail_prot,
std::string* error_msg,
- bool use_ashmem = !kIsTargetLinux);
+ bool use_ashmem = true);
static bool CheckNoGaps(MemMap* begin_map, MemMap* end_map)
REQUIRES(!Locks::mem_maps_lock_);