< prev index next >

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

Print this page
rev 8237 : 8079330: Circular dependency between G1CollectedHeap and G1BlockOffsetSharedArray
Reviewed-by:


 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 public:
 174 
 175   // Return the number of slots needed for an offset array
 176   // that covers mem_region_words words.
 177   static size_t compute_size(size_t mem_region_words) {
 178     size_t number_of_slots = (mem_region_words / N_words);
 179     return ReservedSpace::allocation_align_size_up(number_of_slots);
 180   }
 181 
 182   // Returns how many bytes of the heap a single byte of the BOT corresponds to.
 183   static size_t heap_map_factor() {
 184     return N_bytes;
 185   }
 186 
 187   enum SomePublicConstants {
 188     LogN = 9,
 189     LogN_words = LogN - LogHeapWordSize,
 190     N_bytes = 1 << LogN,
 191     N_words = 1 << LogN_words
 192   };




 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;
 174 
 175 public:
 176 
 177   // Return the number of slots needed for an offset array
 178   // that covers mem_region_words words.
 179   static size_t compute_size(size_t mem_region_words) {
 180     size_t number_of_slots = (mem_region_words / N_words);
 181     return ReservedSpace::allocation_align_size_up(number_of_slots);
 182   }
 183 
 184   // Returns how many bytes of the heap a single byte of the BOT corresponds to.
 185   static size_t heap_map_factor() {
 186     return N_bytes;
 187   }
 188 
 189   enum SomePublicConstants {
 190     LogN = 9,
 191     LogN_words = LogN - LogHeapWordSize,
 192     N_bytes = 1 << LogN,
 193     N_words = 1 << LogN_words
 194   };


< prev index next >