comparison src/share/vm/gc_implementation/g1/collectionSetChooser.hpp @ 6010:720b6a76dd9d

7157073: G1: type change size_t -> uint for region counts / indexes Summary: Change the type of fields / variables / etc. that represent region counts and indeces from size_t to uint. Reviewed-by: iveresov, brutisso, jmasa, jwilhelm
author tonyp
date Wed, 18 Apr 2012 07:21:15 -0400
parents a9647476d1a4
children f7a8920427a6
comparison
equal deleted inserted replaced
6009:dde53abda3d6 6010:720b6a76dd9d
148 hr->live_bytes() < _regionLiveThresholdBytes; 148 hr->live_bytes() < _regionLiveThresholdBytes;
149 } 149 }
150 150
151 // Calculate the minimum number of old regions we'll add to the CSet 151 // Calculate the minimum number of old regions we'll add to the CSet
152 // during a mixed GC. 152 // during a mixed GC.
153 size_t calcMinOldCSetLength(); 153 uint calcMinOldCSetLength();
154 154
155 // Calculate the maximum number of old regions we'll add to the CSet 155 // Calculate the maximum number of old regions we'll add to the CSet
156 // during a mixed GC. 156 // during a mixed GC.
157 size_t calcMaxOldCSetLength(); 157 uint calcMaxOldCSetLength();
158 158
159 // Serial version. 159 // Serial version.
160 void addMarkedHeapRegion(HeapRegion *hr); 160 void addMarkedHeapRegion(HeapRegion *hr);
161 161
162 // Must be called before calls to getParMarkedHeapRegionChunk. 162 // Must be called before calls to getParMarkedHeapRegionChunk.
163 // "n_regions" is the number of regions, "chunkSize" the chunk size. 163 // "n_regions" is the number of regions, "chunkSize" the chunk size.
164 void prepareForAddMarkedHeapRegionsPar(size_t n_regions, size_t chunkSize); 164 void prepareForAddMarkedHeapRegionsPar(uint n_regions, uint chunkSize);
165 // Returns the first index in a contiguous chunk of "n_regions" indexes 165 // Returns the first index in a contiguous chunk of "n_regions" indexes
166 // that the calling thread has reserved. These must be set by the 166 // that the calling thread has reserved. These must be set by the
167 // calling thread using "setMarkedHeapRegion" (to NULL if necessary). 167 // calling thread using "setMarkedHeapRegion" (to NULL if necessary).
168 jint getParMarkedHeapRegionChunk(jint n_regions); 168 jint getParMarkedHeapRegionChunk(jint n_regions);
169 // Set the marked array entry at index to hr. Careful to claim the index 169 // Set the marked array entry at index to hr. Careful to claim the index
174 void updateTotals(jint region_num, size_t reclaimable_bytes); 174 void updateTotals(jint region_num, size_t reclaimable_bytes);
175 175
176 void clearMarkedHeapRegions(); 176 void clearMarkedHeapRegions();
177 177
178 // Return the number of candidate regions that remain to be collected. 178 // Return the number of candidate regions that remain to be collected.
179 size_t remainingRegions() { return _length - _curr_index; } 179 uint remainingRegions() { return (uint) (_length - _curr_index); }
180 180
181 // Determine whether the CSet chooser has more candidate regions or not. 181 // Determine whether the CSet chooser has more candidate regions or not.
182 bool isEmpty() { return remainingRegions() == 0; } 182 bool isEmpty() { return remainingRegions() == 0; }
183 183
184 // Return the reclaimable bytes that remain to be collected on 184 // Return the reclaimable bytes that remain to be collected on