389 out->print_cr(" next offset index: " SIZE_FORMAT, _next_offset_index);
390 }
391 #endif // !PRODUCT
392
393 HeapWord* G1BlockOffsetTablePart::initialize_threshold_raw() {
394 assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array),
395 "just checking");
396 _next_offset_index = _bot->index_for_raw(_space->bottom());
397 _next_offset_index++;
398 _next_offset_threshold =
399 _bot->address_for_index_raw(_next_offset_index);
400 return _next_offset_threshold;
401 }
402
403 void G1BlockOffsetTablePart::zero_bottom_entry_raw() {
404 assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array),
405 "just checking");
406 size_t bottom_index = _bot->index_for_raw(_space->bottom());
407 assert(_bot->address_for_index_raw(bottom_index) == _space->bottom(),
408 "Precondition of call");
409 _bot->set_offset_array_raw(bottom_index, 0);
410 }
411
412 HeapWord* G1BlockOffsetTablePart::initialize_threshold() {
413 assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array),
414 "just checking");
415 _next_offset_index = _bot->index_for(_space->bottom());
416 _next_offset_index++;
417 _next_offset_threshold =
418 _bot->address_for_index(_next_offset_index);
419 return _next_offset_threshold;
420 }
421
422 void G1BlockOffsetTablePart::set_for_starts_humongous(HeapWord* obj_top, size_t fill_size) {
423 // The first BOT entry should have offset 0.
424 reset_bot();
425 alloc_block(_space->bottom(), obj_top);
426 if (fill_size > 0) {
427 alloc_block(obj_top, fill_size);
428 }
429 }
|
389 out->print_cr(" next offset index: " SIZE_FORMAT, _next_offset_index);
390 }
391 #endif // !PRODUCT
392
393 HeapWord* G1BlockOffsetTablePart::initialize_threshold_raw() {
394 assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array),
395 "just checking");
396 _next_offset_index = _bot->index_for_raw(_space->bottom());
397 _next_offset_index++;
398 _next_offset_threshold =
399 _bot->address_for_index_raw(_next_offset_index);
400 return _next_offset_threshold;
401 }
402
403 void G1BlockOffsetTablePart::zero_bottom_entry_raw() {
404 assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array),
405 "just checking");
406 size_t bottom_index = _bot->index_for_raw(_space->bottom());
407 assert(_bot->address_for_index_raw(bottom_index) == _space->bottom(),
408 "Precondition of call");
409 _bot->set_offset_array(bottom_index, 0);
410 }
411
412 HeapWord* G1BlockOffsetTablePart::initialize_threshold() {
413 assert(!G1CollectedHeap::heap()->is_in_reserved(_bot->_offset_array),
414 "just checking");
415 _next_offset_index = _bot->index_for(_space->bottom());
416 _next_offset_index++;
417 _next_offset_threshold =
418 _bot->address_for_index(_next_offset_index);
419 return _next_offset_threshold;
420 }
421
422 void G1BlockOffsetTablePart::set_for_starts_humongous(HeapWord* obj_top, size_t fill_size) {
423 // The first BOT entry should have offset 0.
424 reset_bot();
425 alloc_block(_space->bottom(), obj_top);
426 if (fill_size > 0) {
427 alloc_block(obj_top, fill_size);
428 }
429 }
|