summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/parsed_options.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 3ef7a17615..27f776544a 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -206,7 +206,7 @@ bool ParsedOptions::Parse(const RuntimeOptions& options, bool ignore_unrecognize
// If background_collector_type_ is kCollectorTypeNone, it defaults to the collector_type_ after
// parsing options. If you set this to kCollectorTypeHSpaceCompact then we will do an hspace
// compaction when we transition to background instead of a normal collector transition.
- background_collector_type_ = gc::kCollectorTypeSS;
+ background_collector_type_ = gc::kCollectorTypeHomogeneousSpaceCompact;
stack_size_ = 0; // 0 means default.
max_spins_before_thin_lock_inflation_ = Monitor::kDefaultMaxSpinsBeforeThinLockInflation;
low_memory_mode_ = false;
@@ -394,6 +394,10 @@ bool ParsedOptions::Parse(const RuntimeOptions& options, bool ignore_unrecognize
} 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") {