diff options
Diffstat (limited to 'runtime/gc/heap.cc')
-rw-r--r-- | runtime/gc/heap.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 51b0237981..063c443a05 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -3932,9 +3932,8 @@ void Heap::RemoveRememberedSet(space::Space* space) { void Heap::ClearMarkedObjects() { // Clear all of the spaces' mark bitmaps. for (const auto& space : GetContinuousSpaces()) { - accounting::ContinuousSpaceBitmap* mark_bitmap = space->GetMarkBitmap(); - if (space->GetLiveBitmap() != mark_bitmap) { - mark_bitmap->Clear(); + if (space->GetLiveBitmap() != nullptr && !space->HasBoundBitmaps()) { + space->GetMarkBitmap()->Clear(); } } // Clear the marked objects in the discontinous space object sets. |