< prev index next >
src/hotspot/share/gc/g1/g1BlockOffsetTable.hpp
Print this page
rev 56201 : 8225716: G1 GC: Undefined behaviour in G1BlockOffsetTablePart::block_at_or_preceding
Reviewed-by: kbarrett, tschatzl
@@ -50,11 +50,11 @@
// The reserved region covered by the table.
MemRegion _reserved;
// Array for keeping offsets for retrieving object start fast given an
// address.
- u_char* _offset_array; // byte array keeping backwards offsets
+ volatile u_char* _offset_array; // byte array keeping backwards offsets
void check_offset(size_t offset, const char* msg) const {
assert(offset <= BOTConstants::N_words,
"%s - offset: " SIZE_FORMAT ", N_words: %u",
msg, offset, BOTConstants::N_words);
@@ -62,14 +62,11 @@
// Bounds checking accessors:
// For performance these have to devolve to array accesses in product builds.
inline u_char offset_array(size_t index) const;
- void set_offset_array_raw(size_t index, u_char offset) {
- _offset_array[index] = offset;
- }
-
+ inline void set_offset_array_raw(size_t index, u_char offset);
inline void set_offset_array(size_t index, u_char offset);
inline void set_offset_array(size_t index, HeapWord* high, HeapWord* low);
inline void set_offset_array(size_t left, size_t right, u_char offset);
< prev index next >