< prev index next >

src/share/vm/gc/g1/g1BlockOffsetTable.hpp

Print this page




 132 
 133 class G1BlockOffsetSharedArray: public CHeapObj<mtGC> {
 134   friend class G1BlockOffsetArray;
 135   friend class G1BlockOffsetArrayContigSpace;
 136   friend class VMStructs;
 137 
 138 private:
 139   G1BlockOffsetSharedArrayMappingChangedListener _listener;
 140   // The reserved region covered by the shared array.
 141   MemRegion _reserved;
 142 
 143   // End of the current committed region.
 144   HeapWord* _end;
 145 
 146   // Array for keeping offsets for retrieving object start fast given an
 147   // address.
 148   u_char* _offset_array;          // byte array keeping backwards offsets
 149 
 150   void check_offset(size_t offset, const char* msg) const {
 151     assert(offset <= N_words,
 152            "%s - "
 153            "offset: " SIZE_FORMAT ", N_words: %u",
 154            msg, offset, (uint)N_words);
 155   }
 156 
 157   // Bounds checking accessors:
 158   // For performance these have to devolve to array accesses in product builds.
 159   inline u_char offset_array(size_t index) const;
 160 
 161   void set_offset_array_raw(size_t index, u_char offset) {
 162     _offset_array[index] = offset;
 163   }
 164 
 165   inline void set_offset_array(size_t index, u_char offset);
 166 
 167   inline void set_offset_array(size_t index, HeapWord* high, HeapWord* low);
 168 
 169   inline void set_offset_array(size_t left, size_t right, u_char offset);
 170 
 171   bool is_card_boundary(HeapWord* p) const;
 172 
 173   void check_index(size_t index, const char* msg) const NOT_DEBUG_RETURN;




 132 
 133 class G1BlockOffsetSharedArray: public CHeapObj<mtGC> {
 134   friend class G1BlockOffsetArray;
 135   friend class G1BlockOffsetArrayContigSpace;
 136   friend class VMStructs;
 137 
 138 private:
 139   G1BlockOffsetSharedArrayMappingChangedListener _listener;
 140   // The reserved region covered by the shared array.
 141   MemRegion _reserved;
 142 
 143   // End of the current committed region.
 144   HeapWord* _end;
 145 
 146   // Array for keeping offsets for retrieving object start fast given an
 147   // address.
 148   u_char* _offset_array;          // byte array keeping backwards offsets
 149 
 150   void check_offset(size_t offset, const char* msg) const {
 151     assert(offset <= N_words,
 152            "%s - offset: " SIZE_FORMAT ", N_words: %u",

 153            msg, offset, (uint)N_words);
 154   }
 155 
 156   // Bounds checking accessors:
 157   // For performance these have to devolve to array accesses in product builds.
 158   inline u_char offset_array(size_t index) const;
 159 
 160   void set_offset_array_raw(size_t index, u_char offset) {
 161     _offset_array[index] = offset;
 162   }
 163 
 164   inline void set_offset_array(size_t index, u_char offset);
 165 
 166   inline void set_offset_array(size_t index, HeapWord* high, HeapWord* low);
 167 
 168   inline void set_offset_array(size_t left, size_t right, u_char offset);
 169 
 170   bool is_card_boundary(HeapWord* p) const;
 171 
 172   void check_index(size_t index, const char* msg) const NOT_DEBUG_RETURN;


< prev index next >