diff options
Diffstat (limited to 'runtime/gc/accounting/space_bitmap-inl.h')
-rw-r--r-- | runtime/gc/accounting/space_bitmap-inl.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/runtime/gc/accounting/space_bitmap-inl.h b/runtime/gc/accounting/space_bitmap-inl.h index 4cf5b4f643..61c67f86c4 100644 --- a/runtime/gc/accounting/space_bitmap-inl.h +++ b/runtime/gc/accounting/space_bitmap-inl.h @@ -167,12 +167,8 @@ inline bool SpaceBitmap<kAlignment>::Modify(const mirror::Object* obj) { uintptr_t* address = &bitmap_begin_[index]; uintptr_t old_word = *address; if (kSetBit) { - // Check the bit before setting the word incase we are trying to mark a read only bitmap - // like an image space bitmap. This bitmap is mapped as read only and will fault if we - // attempt to change any words. Since all of the objects are marked, this will never - // occur if we check before setting the bit. This also prevents dirty pages that would - // occur if the bitmap was read write and we did not check the bit. if ((old_word & mask) == 0) { + // Avoid dirtying the page if possible. *address = old_word | mask; } } else { |