445 _next_offset_threshold = NULL; |
445 _next_offset_threshold = NULL; |
446 _next_offset_index = 0; |
446 _next_offset_index = 0; |
447 } |
447 } |
448 |
448 |
449 HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold_raw() { |
449 HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold_raw() { |
450 assert(!Universe::heap()->is_in_reserved(_array->_offset_array), |
|
451 "just checking"); |
|
452 _next_offset_index = _array->index_for_raw(_bottom); |
450 _next_offset_index = _array->index_for_raw(_bottom); |
453 _next_offset_index++; |
451 _next_offset_index++; |
454 _next_offset_threshold = |
452 _next_offset_threshold = |
455 _array->address_for_index_raw(_next_offset_index); |
453 _array->address_for_index_raw(_next_offset_index); |
456 return _next_offset_threshold; |
454 return _next_offset_threshold; |
457 } |
455 } |
458 |
456 |
459 void G1BlockOffsetArrayContigSpace::zero_bottom_entry_raw() { |
457 void G1BlockOffsetArrayContigSpace::zero_bottom_entry_raw() { |
460 assert(!Universe::heap()->is_in_reserved(_array->_offset_array), |
|
461 "just checking"); |
|
462 size_t bottom_index = _array->index_for_raw(_bottom); |
458 size_t bottom_index = _array->index_for_raw(_bottom); |
463 assert(_array->address_for_index_raw(bottom_index) == _bottom, |
459 assert(_array->address_for_index_raw(bottom_index) == _bottom, |
464 "Precondition of call"); |
460 "Precondition of call"); |
465 _array->set_offset_array_raw(bottom_index, 0); |
461 _array->set_offset_array_raw(bottom_index, 0); |
466 } |
462 } |
467 |
463 |
468 HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold() { |
464 HeapWord* G1BlockOffsetArrayContigSpace::initialize_threshold() { |
469 assert(!Universe::heap()->is_in_reserved(_array->_offset_array), |
|
470 "just checking"); |
|
471 _next_offset_index = _array->index_for(_bottom); |
465 _next_offset_index = _array->index_for(_bottom); |
472 _next_offset_index++; |
466 _next_offset_index++; |
473 _next_offset_threshold = |
467 _next_offset_threshold = |
474 _array->address_for_index(_next_offset_index); |
468 _array->address_for_index(_next_offset_index); |
475 return _next_offset_threshold; |
469 return _next_offset_threshold; |