231 void set_init_to_zero(bool val) { _init_to_zero = val; }
232 bool init_to_zero() { return _init_to_zero; }
233
234 // Updates all the BlockOffsetArray's sharing this shared array to
235 // reflect the current "top"'s of their spaces.
236 void update_offset_arrays(); // Not yet implemented!
237
238 // Return the appropriate index into "_offset_array" for "p".
239 size_t index_for(const void* p) const;
240
241 // Return the address indicating the start of the region corresponding to
242 // "index" in "_offset_array".
243 HeapWord* address_for_index(size_t index) const;
244 };
245
246 //////////////////////////////////////////////////////////////////////////
247 // The BlockOffsetArray whose subtypes use the BlockOffsetSharedArray.
248 //////////////////////////////////////////////////////////////////////////
249 class BlockOffsetArray: public BlockOffsetTable {
250 friend class VMStructs;
251 friend class G1BlockOffsetArray; // temp. until we restructure and cleanup
252 protected:
253 // The following enums are used by do_block_internal() below
254 enum Action {
255 Action_single, // BOT records a single block (see single_block())
256 Action_mark, // BOT marks the start of a block (see mark_block())
257 Action_check // Check that BOT records block correctly
258 // (see verify_single_block()).
259 };
260
261 enum SomePrivateConstants {
262 N_words = BlockOffsetSharedArray::N_words,
263 LogN = BlockOffsetSharedArray::LogN,
264 // entries "e" of at least N_words mean "go back by Base^(e-N_words)."
265 // All entries are less than "N_words + N_powers".
266 LogBase = 4,
267 Base = (1 << LogBase),
268 N_powers = 14
269 };
270
271 static size_t power_to_cards_back(uint i) {
|
231 void set_init_to_zero(bool val) { _init_to_zero = val; }
232 bool init_to_zero() { return _init_to_zero; }
233
234 // Updates all the BlockOffsetArray's sharing this shared array to
235 // reflect the current "top"'s of their spaces.
236 void update_offset_arrays(); // Not yet implemented!
237
238 // Return the appropriate index into "_offset_array" for "p".
239 size_t index_for(const void* p) const;
240
241 // Return the address indicating the start of the region corresponding to
242 // "index" in "_offset_array".
243 HeapWord* address_for_index(size_t index) const;
244 };
245
246 //////////////////////////////////////////////////////////////////////////
247 // The BlockOffsetArray whose subtypes use the BlockOffsetSharedArray.
248 //////////////////////////////////////////////////////////////////////////
249 class BlockOffsetArray: public BlockOffsetTable {
250 friend class VMStructs;
251 friend class G1BlockOffsetTablePart; // temp. until we restructure and cleanup
252 protected:
253 // The following enums are used by do_block_internal() below
254 enum Action {
255 Action_single, // BOT records a single block (see single_block())
256 Action_mark, // BOT marks the start of a block (see mark_block())
257 Action_check // Check that BOT records block correctly
258 // (see verify_single_block()).
259 };
260
261 enum SomePrivateConstants {
262 N_words = BlockOffsetSharedArray::N_words,
263 LogN = BlockOffsetSharedArray::LogN,
264 // entries "e" of at least N_words mean "go back by Base^(e-N_words)."
265 // All entries are less than "N_words + N_powers".
266 LogBase = 4,
267 Base = (1 << LogBase),
268 N_powers = 14
269 };
270
271 static size_t power_to_cards_back(uint i) {
|