8328361: Use memset() in method CardTable::dirty_MemRegion()

Reviewed-by: ayang, kbarrett
This commit is contained in:
Guoxiong Li 2024-03-29 10:42:00 +00:00
parent 245514da51
commit 418deaf5a1

View File

@ -204,10 +204,7 @@ void CardTable::dirty_MemRegion(MemRegion mr) {
assert(align_up (mr.end(), HeapWordSize) == mr.end(), "Unaligned end" );
CardValue* cur = byte_for(mr.start());
CardValue* last = byte_after(mr.last());
while (cur < last) {
*cur = dirty_card;
cur++;
}
memset(cur, dirty_card, pointer_delta(last, cur, sizeof(CardValue)));
}
void CardTable::clear_MemRegion(MemRegion mr) {