SUGGESTED FIX
diff --git a/src/share/vm/memory/blockOffsetTable.hpp b/src/share/vm/memory/blockOffsetTable.hpp
--- a/src/share/vm/memory/blockOffsetTable.hpp
+++ b/src/share/vm/memory/blockOffsetTable.hpp
@@ -198,6 +198,10 @@ public:
// Return the address indicating the start of the region corresponding to
// "index" in "_offset_array".
HeapWord* address_for_index(size_t index) const;
+
+ // Return the address "p" incremented by the size of
+ // a region.
+ HeapWord* inc_by_region_size(HeapWord* p) const { return p + N_words; }
// Shared space support
void serialize(SerializeOopClosure* soc, HeapWord* start, HeapWord* end);
diff --git a/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.cpp b/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.cpp
--- a/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.cpp
+++ b/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.cpp
@@ -229,7 +229,7 @@ void ParGCAllocBufferWithBOT::retire(boo
HeapWord* first_card_start = _bsa->address_for_index(first_card_index);
if (first_card_start < pre_top) {
HeapWord* second_card_start =
- _bsa->address_for_index(first_card_index + 1);
+ _bsa->inc_by_region_size(first_card_start);
// Ensure enough room to fill with the smallest block
second_card_start = MAX2(second_card_start, pre_top + AlignmentReserve);
|