252 } |
252 } |
253 |
253 |
254 HeapRegion* SurvivorGCAllocRegion::allocate_new_region(size_t word_size, |
254 HeapRegion* SurvivorGCAllocRegion::allocate_new_region(size_t word_size, |
255 bool force) { |
255 bool force) { |
256 assert(!force, "not supported for GC alloc regions"); |
256 assert(!force, "not supported for GC alloc regions"); |
257 return _g1h->new_gc_alloc_region(word_size, count(), GCAllocForSurvived); |
257 return _g1h->new_gc_alloc_region(word_size, count(), InCSetState::Young); |
258 } |
258 } |
259 |
259 |
260 void SurvivorGCAllocRegion::retire_region(HeapRegion* alloc_region, |
260 void SurvivorGCAllocRegion::retire_region(HeapRegion* alloc_region, |
261 size_t allocated_bytes) { |
261 size_t allocated_bytes) { |
262 _g1h->retire_gc_alloc_region(alloc_region, allocated_bytes, |
262 _g1h->retire_gc_alloc_region(alloc_region, allocated_bytes, InCSetState::Young); |
263 GCAllocForSurvived); |
|
264 } |
263 } |
265 |
264 |
266 HeapRegion* OldGCAllocRegion::allocate_new_region(size_t word_size, |
265 HeapRegion* OldGCAllocRegion::allocate_new_region(size_t word_size, |
267 bool force) { |
266 bool force) { |
268 assert(!force, "not supported for GC alloc regions"); |
267 assert(!force, "not supported for GC alloc regions"); |
269 return _g1h->new_gc_alloc_region(word_size, count(), GCAllocForTenured); |
268 return _g1h->new_gc_alloc_region(word_size, count(), InCSetState::Old); |
270 } |
269 } |
271 |
270 |
272 void OldGCAllocRegion::retire_region(HeapRegion* alloc_region, |
271 void OldGCAllocRegion::retire_region(HeapRegion* alloc_region, |
273 size_t allocated_bytes) { |
272 size_t allocated_bytes) { |
274 _g1h->retire_gc_alloc_region(alloc_region, allocated_bytes, |
273 _g1h->retire_gc_alloc_region(alloc_region, allocated_bytes, InCSetState::Old); |
275 GCAllocForTenured); |
|
276 } |
274 } |
277 |
275 |
278 HeapRegion* OldGCAllocRegion::release() { |
276 HeapRegion* OldGCAllocRegion::release() { |
279 HeapRegion* cur = get(); |
277 HeapRegion* cur = get(); |
280 if (cur != NULL) { |
278 if (cur != NULL) { |