8328361: Use memset() in method CardTable::dirty_MemRegion()
Reviewed-by: ayang, kbarrett
This commit is contained in:
parent
245514da51
commit
418deaf5a1
@ -204,10 +204,7 @@ void CardTable::dirty_MemRegion(MemRegion mr) {
|
|||||||
assert(align_up (mr.end(), HeapWordSize) == mr.end(), "Unaligned end" );
|
assert(align_up (mr.end(), HeapWordSize) == mr.end(), "Unaligned end" );
|
||||||
CardValue* cur = byte_for(mr.start());
|
CardValue* cur = byte_for(mr.start());
|
||||||
CardValue* last = byte_after(mr.last());
|
CardValue* last = byte_after(mr.last());
|
||||||
while (cur < last) {
|
memset(cur, dirty_card, pointer_delta(last, cur, sizeof(CardValue)));
|
||||||
*cur = dirty_card;
|
|
||||||
cur++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CardTable::clear_MemRegion(MemRegion mr) {
|
void CardTable::clear_MemRegion(MemRegion mr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user