Fix testing wrong variable for non zygote.
For non zygote we want to only have a single non moving space to
let dex2oat use RosAlloc for all allocations.
Fixed stale low memory logic in parsed options.
Bug: 17189964
(cherry picked from commit a12c2a945fe3f10d3ed31aa5db3e422cc1ad7f98)
Change-Id: I4fc00b277db6780ed410eab4cd969e8f004d5348
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index f0b7685..1e01164 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -224,7 +224,7 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
*/
bool support_homogeneous_space_compaction =
- background_collector_type == gc::kCollectorTypeHomogeneousSpaceCompact ||
+ background_collector_type_ == gc::kCollectorTypeHomogeneousSpaceCompact ||
use_homogeneous_space_compaction_for_oom;
// We may use the same space the main space for the non moving space if we don't need to compact
// from the main space.
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 26360d7..c16bf0f 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -394,10 +394,6 @@
} else if (option == "-XX:IgnoreMaxFootprint") {
ignore_max_footprint_ = true;
} else if (option == "-XX:LowMemoryMode") {
- if (background_collector_type_ == gc::kCollectorTypeHomogeneousSpaceCompact) {
- // Use semispace instead of homogenous space compact for low memory mode.
- background_collector_type_ = gc::kCollectorTypeSS;
- }
low_memory_mode_ = true;
// TODO Might want to turn off must_relocate here.
} else if (option == "-XX:UseTLAB") {