diff options
-rw-r--r-- | runtime/parsed_options.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc index 6b4f764d6e..2bd994dc57 100644 --- a/runtime/parsed_options.cc +++ b/runtime/parsed_options.cc @@ -80,7 +80,7 @@ ParsedOptions::ParsedOptions() gc::kCollectorTypeCMS), #error "ART default GC type must be set" #endif - background_collector_type_(gc::kCollectorTypeHomogeneousSpaceCompact), + background_collector_type_(gc::kCollectorTypeNone), // If background_collector_type_ is // kCollectorTypeNone, it defaults to the // collector_type_ after parsing options. If @@ -696,6 +696,12 @@ bool ParsedOptions::Parse(const RuntimeOptions& options, bool ignore_unrecognize return false; } } + // If not set, background collector type defaults to homogeneous compaction + // if not low memory mode, semispace otherwise. + if (background_collector_type_ == gc::kCollectorTypeNone) { + background_collector_type_ = low_memory_mode_ ? + gc::kCollectorTypeSS : gc::kCollectorTypeHomogeneousSpaceCompact; + } // If a reference to the dalvik core.jar snuck in, replace it with // the art specific version. This can happen with on device |