< prev index next >
src/share/vm/gc/g1/heapRegionManager.hpp
Print this page
rev 10742 : Make fields used in lock-free algorithms volatile
@@ -258,11 +258,11 @@
// The HeapRegionClaimer is used during parallel iteration over heap regions,
// allowing workers to claim heap regions, gaining exclusive rights to these regions.
class HeapRegionClaimer : public StackObj {
uint _n_workers;
uint _n_regions;
- uint* _claims;
+ volatile uint* _claims;
static const uint Unclaimed = 0;
static const uint Claimed = 1;
public:
@@ -282,6 +282,5 @@
// Claim the given region, returns true if successfully claimed.
bool claim_region(uint region_index);
};
#endif // SHARE_VM_GC_G1_HEAPREGIONMANAGER_HPP
-
< prev index next >