summaryrefslogtreecommitdiff
path: root/runtime/gc/heap.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2019-07-30 09:47:35 -0700
committer Mathieu Chartier <mathieuc@google.com> 2019-08-01 16:17:17 +0000
commit6f382013399fc8ba8b2717e4d24d91978d2bc0f7 (patch)
tree53b6bca63d5a1c34b2a60e5d8ef39f7cb22d4fe9 /runtime/gc/heap.cc
parent2b9c8c94fc92c6f2c7c1703efc1793d17ffde297 (diff)
Refactor space bitmap to be a value object
Remove the need for pointer indirections at many places, reduce the amount of code. Bug: 116052292 Test: test-art-host Change-Id: I4b1040d29f9ba99ea23c51f70a06af2ffbe496d4
Diffstat (limited to 'runtime/gc/heap.cc')
-rw-r--r--runtime/gc/heap.cc5
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.