diff options
| -rw-r--r-- | runtime/gc/collector/mark_compact.cc | 2 | ||||
| -rw-r--r-- | runtime/gc/space/bump_pointer_space-walk-inl.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/runtime/gc/collector/mark_compact.cc b/runtime/gc/collector/mark_compact.cc index 1713e67120..a7af756970 100644 --- a/runtime/gc/collector/mark_compact.cc +++ b/runtime/gc/collector/mark_compact.cc @@ -787,6 +787,7 @@ void MarkCompact::RunPhases() { } } FinishPhase(); + GetHeap()->PostGcVerification(this); thread_running_gc_ = nullptr; } @@ -1061,6 +1062,7 @@ bool MarkCompact::PrepareForCompaction() { // We shouldn't be consuming more space after compaction than pre-compaction. CHECK_GE(black_objs_slide_diff_, 0); if (black_objs_slide_diff_ == 0) { + black_dense_end_ = black_allocations_begin_; return false; } for (size_t i = vector_len; i < vector_length_; i++) { diff --git a/runtime/gc/space/bump_pointer_space-walk-inl.h b/runtime/gc/space/bump_pointer_space-walk-inl.h index 38e02d5829..26402e8d3d 100644 --- a/runtime/gc/space/bump_pointer_space-walk-inl.h +++ b/runtime/gc/space/bump_pointer_space-walk-inl.h @@ -115,7 +115,7 @@ inline void BumpPointerSpace::Walk(Visitor&& visitor) { if (ptr > pos) { // Adjust block-size in case 'pos' is in the middle of the block. if (static_cast<ssize_t>(block_size) > ptr - pos) { - (*block_sizes_copy)[iter] -= ptr - pos; + (*block_sizes_copy)[iter] = ptr - pos; } break; } |