< prev index next >
src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp
Print this page
rev 56195 : 8225716: G1 GC: Undefined behaviour in G1BlockOffsetTablePart::block_at_or_preceding
Reviewed-by: kbarrett, tschatzl
*** 389,418 ****
out->print_cr(" next offset index: " SIZE_FORMAT, _next_offset_index);
}
#endif // !PRODUCT
HeapWord* G1BlockOffsetTablePart::initialize_threshold_raw() {
! assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array),
"just checking");
_next_offset_index = _bot->index_for_raw(_space->bottom());
_next_offset_index++;
_next_offset_threshold =
_bot->address_for_index_raw(_next_offset_index);
return _next_offset_threshold;
}
void G1BlockOffsetTablePart::zero_bottom_entry_raw() {
! assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array),
"just checking");
size_t bottom_index = _bot->index_for_raw(_space->bottom());
assert(_bot->address_for_index_raw(bottom_index) == _space->bottom(),
"Precondition of call");
_bot->set_offset_array_raw(bottom_index, 0);
}
HeapWord* G1BlockOffsetTablePart::initialize_threshold() {
! assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array),
"just checking");
_next_offset_index = _bot->index_for(_space->bottom());
_next_offset_index++;
_next_offset_threshold =
_bot->address_for_index(_next_offset_index);
--- 389,418 ----
out->print_cr(" next offset index: " SIZE_FORMAT, _next_offset_index);
}
#endif // !PRODUCT
HeapWord* G1BlockOffsetTablePart::initialize_threshold_raw() {
! assert(!G1CollectedHeap::heap()->is_in_reserved(const_cast<u_char*> (_bot->_offset_array)),
"just checking");
_next_offset_index = _bot->index_for_raw(_space->bottom());
_next_offset_index++;
_next_offset_threshold =
_bot->address_for_index_raw(_next_offset_index);
return _next_offset_threshold;
}
void G1BlockOffsetTablePart::zero_bottom_entry_raw() {
! assert(!G1CollectedHeap::heap()->is_in_reserved(const_cast<u_char*> (_bot->_offset_array)),
"just checking");
size_t bottom_index = _bot->index_for_raw(_space->bottom());
assert(_bot->address_for_index_raw(bottom_index) == _space->bottom(),
"Precondition of call");
_bot->set_offset_array_raw(bottom_index, 0);
}
HeapWord* G1BlockOffsetTablePart::initialize_threshold() {
! assert(!G1CollectedHeap::heap()->is_in_reserved(const_cast<u_char*> (_bot->_offset_array)),
"just checking");
_next_offset_index = _bot->index_for(_space->bottom());
_next_offset_index++;
_next_offset_threshold =
_bot->address_for_index(_next_offset_index);
< prev index next >