1.1 --- a/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp Tue Oct 22 12:03:50 2013 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp Wed Oct 23 10:23:06 2013 +0200 1.3 @@ -55,7 +55,7 @@ 1.4 // then _alloc_region is NULL and this object should not be used to 1.5 // satisfy allocation requests (it was done this way to force the 1.6 // correct use of init() and release()). 1.7 - HeapRegion* _alloc_region; 1.8 + HeapRegion* volatile _alloc_region; 1.9 1.10 // It keeps track of the distinct number of regions that are used 1.11 // for allocation in the active interval of this object, i.e., 1.12 @@ -132,8 +132,9 @@ 1.13 static void setup(G1CollectedHeap* g1h, HeapRegion* dummy_region); 1.14 1.15 HeapRegion* get() const { 1.16 + HeapRegion * hr = _alloc_region; 1.17 // Make sure that the dummy region does not escape this class. 1.18 - return (_alloc_region == _dummy_region) ? NULL : _alloc_region; 1.19 + return (hr == _dummy_region) ? NULL : hr; 1.20 } 1.21 1.22 uint count() { return _count; }