summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2015-03-11 19:09:07 -0700
committerHiroshi Yamauchi <yamauchi@google.com>2015-03-11 19:11:08 -0700
commitd04495edc261bf7fbdb7c6a1c31c6dda08e990ed (patch)
tree9effa9e0704874a784a6d14bab957e141de1a169 /runtime
parent6b743b7b3a5cfbacca44cc65e1a4c138588889da (diff)
downloadart-d04495edc261bf7fbdb7c6a1c31c6dda08e990ed.zip
art-d04495edc261bf7fbdb7c6a1c31c6dda08e990ed.tar.gz
art-d04495edc261bf7fbdb7c6a1c31c6dda08e990ed.tar.bz2
Fix CC collector boot.
Avoid a DCHECK failure that the semi space collector isn't initialized at the pre-zygote fork time when the CC collector is used. Change-Id: If35707b241be05a341abb11ba51fbd0bc222d219
Diffstat (limited to 'runtime')
-rw-r--r--runtime/gc/heap.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index a41d65c..c421262 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -2064,8 +2064,6 @@ void Heap::PreZygoteFork() {
non_moving_space_->GetMemMap()->Protect(PROT_READ | PROT_WRITE);
const bool same_space = non_moving_space_ == main_space_;
if (kCompactZygote) {
- // Can't compact if the non moving space is the same as the main space.
- DCHECK(semi_space_collector_ != nullptr);
// Temporarily disable rosalloc verification because the zygote
// compaction will mess up the rosalloc internal metadata.
ScopedDisableRosAllocVerification disable_rosalloc_verif(this);
@@ -2084,6 +2082,8 @@ void Heap::PreZygoteFork() {
}
} else {
CHECK(main_space_ != nullptr);
+ CHECK_NE(main_space_, non_moving_space_)
+ << "Does not make sense to compact within the same space";
// Copy from the main space.
zygote_collector.SetFromSpace(main_space_);
reset_main_space = true;