mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8164948: Initializing stores of HeapRegions are not ordered with regards to their use in G1ConcurrentMark
Add a storestore barrier before publishing newly initialized HeapRegion instances, and place a loadload barrier before use of members. Reviewed-by: sjohanss, sangheki
This commit is contained in:
parent
e3245f1900
commit
c719b0171c
2 changed files with 3 additions and 1 deletions
|
@ -123,6 +123,7 @@ void HeapRegionManager::make_regions_available(uint start, uint num_regions) {
|
|||
for (uint i = start; i < start + num_regions; i++) {
|
||||
if (_regions.get_by_index(i) == NULL) {
|
||||
HeapRegion* new_hr = new_heap_region(i);
|
||||
OrderAccess::storestore();
|
||||
_regions.set_by_index(i, new_hr);
|
||||
_allocated_heapregions_length = MAX2(_allocated_heapregions_length, i + 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue