< prev index next >

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

Print this page




 483 void G1BlockOffsetArrayContigSpace::zero_bottom_entry_raw() {
 484   assert(!G1CollectedHeap::heap()->is_in_reserved(_array->_offset_array),
 485          "just checking");
 486   size_t bottom_index = _array->index_for_raw(_bottom);
 487   assert(_array->address_for_index_raw(bottom_index) == _bottom,
 488          "Precondition of call");
 489   _array->set_offset_array_raw(bottom_index, 0);
 490 }
 491 
 492 HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold() {
 493   assert(!G1CollectedHeap::heap()->is_in_reserved(_array->_offset_array),
 494          "just checking");
 495   _next_offset_index = _array->index_for(_bottom);
 496   _next_offset_index++;
 497   _next_offset_threshold =
 498     _array->address_for_index(_next_offset_index);
 499   return _next_offset_threshold;
 500 }
 501 
 502 void
 503 G1BlockOffsetArrayContigSpace::set_for_starts_humongous(HeapWord* new_top) {
 504   assert(new_top <= _end, "_end should have already been updated");
 505 
 506   // The first BOT entry should have offset 0.
 507   reset_bot();
 508   alloc_block(_bottom, new_top);
 509  }
 510 
 511 #ifndef PRODUCT
 512 void
 513 G1BlockOffsetArrayContigSpace::print_on(outputStream* out) {
 514   G1BlockOffsetArray::print_on(out);
 515   out->print_cr("  next offset threshold: " PTR_FORMAT, p2i(_next_offset_threshold));
 516   out->print_cr("  next offset index:     " SIZE_FORMAT, _next_offset_index);
 517 }
 518 #endif // !PRODUCT


 483 void G1BlockOffsetArrayContigSpace::zero_bottom_entry_raw() {
 484   assert(!G1CollectedHeap::heap()->is_in_reserved(_array->_offset_array),
 485          "just checking");
 486   size_t bottom_index = _array->index_for_raw(_bottom);
 487   assert(_array->address_for_index_raw(bottom_index) == _bottom,
 488          "Precondition of call");
 489   _array->set_offset_array_raw(bottom_index, 0);
 490 }
 491 
 492 HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold() {
 493   assert(!G1CollectedHeap::heap()->is_in_reserved(_array->_offset_array),
 494          "just checking");
 495   _next_offset_index = _array->index_for(_bottom);
 496   _next_offset_index++;
 497   _next_offset_threshold =
 498     _array->address_for_index(_next_offset_index);
 499   return _next_offset_threshold;
 500 }
 501 
 502 void
 503 G1BlockOffsetArrayContigSpace::set_for_starts_humongous(HeapWord* obj_top) {


 504   // The first BOT entry should have offset 0.
 505   reset_bot();
 506   alloc_block(_bottom, obj_top);
 507  }
 508 
 509 #ifndef PRODUCT
 510 void
 511 G1BlockOffsetArrayContigSpace::print_on(outputStream* out) {
 512   G1BlockOffsetArray::print_on(out);
 513   out->print_cr("  next offset threshold: " PTR_FORMAT, p2i(_next_offset_threshold));
 514   out->print_cr("  next offset index:     " SIZE_FORMAT, _next_offset_index);
 515 }
 516 #endif // !PRODUCT
< prev index next >