Persistent bitmap for region space
Fix bug where region space was not safely walkable due to holes
in the unevac regions possibly having dangling class pointers.
No preformance change, RAM overhead 1.1-1.2% .Heap (non LOS).
Test: test-art-host
Test: https://android-review.googlesource.com/#/c/288907/
Bug: 31522820
Change-Id: Ic4f8b7175e117689cb1ce3e28b082cf63f1f7b5a
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index ba18699..918b8db 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -2490,6 +2490,8 @@
} else {
if (collector_type_ == kCollectorTypeCC) {
region_space_->GetMemMap()->Protect(PROT_READ | PROT_WRITE);
+ // Evacuated everything out of the region space, clear the mark bitmap.
+ region_space_->GetMarkBitmap()->Clear();
} else {
bump_pointer_space_->GetMemMap()->Protect(PROT_READ | PROT_WRITE);
}