comparison 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
comparison
equal deleted inserted replaced
12782:92b7ec34ddfa 13086:096c224171c4
53 // allocation requests. If this object is not initialized 53 // allocation requests. If this object is not initialized
54 // (i.e. init() has not been called or release() has been called) 54 // (i.e. init() has not been called or release() has been called)
55 // then _alloc_region is NULL and this object should not be used to 55 // then _alloc_region is NULL and this object should not be used to
56 // satisfy allocation requests (it was done this way to force the 56 // satisfy allocation requests (it was done this way to force the
57 // correct use of init() and release()). 57 // correct use of init() and release()).
58 HeapRegion* _alloc_region; 58 HeapRegion* volatile _alloc_region;
59 59
60 // It keeps track of the distinct number of regions that are used 60 // It keeps track of the distinct number of regions that are used
61 // for allocation in the active interval of this object, i.e., 61 // for allocation in the active interval of this object, i.e.,
62 // between a call to init() and a call to release(). The count 62 // between a call to init() and a call to release(). The count
63 // mostly includes regions that are freshly allocated, as well as 63 // mostly includes regions that are freshly allocated, as well as
130 130
131 public: 131 public:
132 static void setup(G1CollectedHeap* g1h, HeapRegion* dummy_region); 132 static void setup(G1CollectedHeap* g1h, HeapRegion* dummy_region);
133 133
134 HeapRegion* get() const { 134 HeapRegion* get() const {
135 HeapRegion * hr = _alloc_region;
135 // Make sure that the dummy region does not escape this class. 136 // Make sure that the dummy region does not escape this class.
136 return (_alloc_region == _dummy_region) ? NULL : _alloc_region; 137 return (hr == _dummy_region) ? NULL : hr;
137 } 138 }
138 139
139 uint count() { return _count; } 140 uint count() { return _count; }
140 141
141 // The following two are the building blocks for the allocation method. 142 // The following two are the building blocks for the allocation method.