Fix image test with GSS
There was a gap between image space and non moving space for some
reason. No time for a better fix.
Bug: 26849108
Change-Id: If7fe9db060b7accbffd1b4636ce4e0d82a02ed7b
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 84483b4..d76a8d1 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -357,7 +357,11 @@
std::unique_ptr<MemMap> main_mem_map_2;
// Gross hack to make dex2oat deterministic.
- if (requested_alloc_space_begin == nullptr && Runtime::Current()->IsAotCompiler()) {
+ if (foreground_collector_type_ == kCollectorTypeMS &&
+ requested_alloc_space_begin == nullptr &&
+ Runtime::Current()->IsAotCompiler()) {
+ // Currently only enabled for MS collector since that is what the deterministic dex2oat uses.
+ // b/26849108
requested_alloc_space_begin = reinterpret_cast<uint8_t*>(kAllocSpaceBeginForDeterministicAoT);
}
uint8_t* request_begin = requested_alloc_space_begin;