equal
deleted
inserted
replaced
50 // The reserved region covered by the table. |
50 // The reserved region covered by the table. |
51 MemRegion _reserved; |
51 MemRegion _reserved; |
52 |
52 |
53 // Array for keeping offsets for retrieving object start fast given an |
53 // Array for keeping offsets for retrieving object start fast given an |
54 // address. |
54 // address. |
55 u_char* _offset_array; // byte array keeping backwards offsets |
55 volatile u_char* _offset_array; // byte array keeping backwards offsets |
56 |
56 |
57 void check_offset(size_t offset, const char* msg) const { |
57 void check_offset(size_t offset, const char* msg) const { |
58 assert(offset <= BOTConstants::N_words, |
58 assert(offset <= BOTConstants::N_words, |
59 "%s - offset: " SIZE_FORMAT ", N_words: %u", |
59 "%s - offset: " SIZE_FORMAT ", N_words: %u", |
60 msg, offset, BOTConstants::N_words); |
60 msg, offset, BOTConstants::N_words); |
62 |
62 |
63 // Bounds checking accessors: |
63 // Bounds checking accessors: |
64 // For performance these have to devolve to array accesses in product builds. |
64 // For performance these have to devolve to array accesses in product builds. |
65 inline u_char offset_array(size_t index) const; |
65 inline u_char offset_array(size_t index) const; |
66 |
66 |
67 void set_offset_array_raw(size_t index, u_char offset) { |
67 inline void set_offset_array_raw(size_t index, u_char offset); |
68 _offset_array[index] = offset; |
|
69 } |
|
70 |
|
71 inline void set_offset_array(size_t index, u_char offset); |
68 inline void set_offset_array(size_t index, u_char offset); |
72 |
69 |
73 inline void set_offset_array(size_t index, HeapWord* high, HeapWord* low); |
70 inline void set_offset_array(size_t index, HeapWord* high, HeapWord* low); |
74 |
71 |
75 inline void set_offset_array(size_t left, size_t right, u_char offset); |
72 inline void set_offset_array(size_t left, size_t right, u_char offset); |