< prev index next >

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

Print this page




 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            err_msg("%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;




 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            err_msg("%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;


< prev index next >