diff src/share/vm/gc_implementation/g1/g1AllocRegion.hpp @ 13086:096c224171c4

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 20 Nov 2013 00:10:38 +0100
parents 359f7e70ae7f 1b422ef5288a
children d8041d695d19
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp	Tue Nov 19 17:44:26 2013 +0100
+++ b/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp	Wed Nov 20 00:10:38 2013 +0100
@@ -55,7 +55,7 @@
   // then _alloc_region is NULL and this object should not be used to
   // satisfy allocation requests (it was done this way to force the
   // correct use of init() and release()).
-  HeapRegion* _alloc_region;
+  HeapRegion* volatile _alloc_region;
 
   // It keeps track of the distinct number of regions that are used
   // for allocation in the active interval of this object, i.e.,
@@ -132,8 +132,9 @@
   static void setup(G1CollectedHeap* g1h, HeapRegion* dummy_region);
 
   HeapRegion* get() const {
+    HeapRegion * hr = _alloc_region;
     // Make sure that the dummy region does not escape this class.
-    return (_alloc_region == _dummy_region) ? NULL : _alloc_region;
+    return (hr == _dummy_region) ? NULL : hr;
   }
 
   uint count() { return _count; }