< prev index next >
src/share/vm/gc/g1/g1Allocator.cpp
Print this page
rev 13365 : [mq]: review_update_1
*** 329,344 ****
}
}
}
bool G1ArchiveAllocator::_archive_check_enabled = false;
! G1ArchiveRegionMap G1ArchiveAllocator::_archive_region_map;
! G1ArchiveAllocator* G1ArchiveAllocator::create_allocator(G1CollectedHeap* g1h) {
// Create the archive allocator, and also enable archive object checking
// in mark-sweep, since we will be creating archive regions.
! G1ArchiveAllocator* result = new G1ArchiveAllocator(g1h);
enable_archive_object_check();
return result;
}
bool G1ArchiveAllocator::alloc_new_region() {
--- 329,345 ----
}
}
}
bool G1ArchiveAllocator::_archive_check_enabled = false;
! G1ArchiveRegionMap G1ArchiveAllocator::_closed_archive_region_map;
! G1ArchiveRegionMap G1ArchiveAllocator::_open_archive_region_map;
! G1ArchiveAllocator* G1ArchiveAllocator::create_allocator(G1CollectedHeap* g1h, bool open) {
// Create the archive allocator, and also enable archive object checking
// in mark-sweep, since we will be creating archive regions.
! G1ArchiveAllocator* result = new G1ArchiveAllocator(g1h, open);
enable_archive_object_check();
return result;
}
bool G1ArchiveAllocator::alloc_new_region() {
*** 348,358 ****
HeapRegion* hr = _g1h->alloc_highest_free_region();
if (hr == NULL) {
return false;
}
assert(hr->is_empty(), "expected empty region (index %u)", hr->hrm_index());
! hr->set_archive();
_g1h->old_set_add(hr);
_g1h->hr_printer()->alloc(hr);
_allocated_regions.append(hr);
_allocation_region = hr;
--- 349,363 ----
HeapRegion* hr = _g1h->alloc_highest_free_region();
if (hr == NULL) {
return false;
}
assert(hr->is_empty(), "expected empty region (index %u)", hr->hrm_index());
! if (_open) {
! hr->set_open_archive();
! } else {
! hr->set_closed_archive();
! }
_g1h->old_set_add(hr);
_g1h->hr_printer()->alloc(hr);
_allocated_regions.append(hr);
_allocation_region = hr;
*** 360,370 ****
// min_region_size'd chunk of the allocated G1 region.
_bottom = hr->bottom();
_max = _bottom + HeapRegion::min_region_size_in_words();
// Tell mark-sweep that objects in this region are not to be marked.
! set_range_archive(MemRegion(_bottom, HeapRegion::GrainWords), true);
// Since we've modified the old set, call update_sizes.
_g1h->g1mm()->update_sizes();
return true;
}
--- 365,375 ----
// min_region_size'd chunk of the allocated G1 region.
_bottom = hr->bottom();
_max = _bottom + HeapRegion::min_region_size_in_words();
// Tell mark-sweep that objects in this region are not to be marked.
! set_range_archive(MemRegion(_bottom, HeapRegion::GrainWords), _open);
// Since we've modified the old set, call update_sizes.
_g1h->g1mm()->update_sizes();
return true;
}
< prev index next >