Skip to content

Commit b94b679

Browse files
author
Kim Barrett
committed
8309627: Incorrect sorting of DirtyCardQueue buffers
Reviewed-by: ayang, shade
1 parent aace3dc commit b94b679

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hotspot/share/gc/g1/g1DirtyCardQueue.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ class G1RefineBufferedCards : public StackObj {
346346
G1ConcurrentRefineStats* _stats;
347347
G1RemSet* const _g1rs;
348348

349-
static inline int compare_card(const CardTable::CardValue* p1,
350-
const CardTable::CardValue* p2) {
349+
static inline ptrdiff_t compare_cards(const CardTable::CardValue* p1,
350+
const CardTable::CardValue* p2) {
351351
return p2 - p1;
352352
}
353353

@@ -357,7 +357,7 @@ class G1RefineBufferedCards : public StackObj {
357357
void sort_cards(size_t start_index) {
358358
QuickSort::sort(&_node_buffer[start_index],
359359
_node_buffer_size - start_index,
360-
compare_card,
360+
compare_cards,
361361
false);
362362
}
363363

0 commit comments

Comments
 (0)