< prev index next >
src/share/vm/gc/g1/g1CollectedHeap.cpp
Print this page
*** 5389,5399 ****
HeapRegion* G1CollectedHeap::new_gc_alloc_region(size_t word_size,
uint count,
InCSetState dest) {
assert(FreeList_lock->owned_by_self(), "pre-condition");
! if (count < g1_policy()->max_regions(dest)) {
const bool is_survivor = (dest.is_young());
HeapRegion* new_alloc_region = new_region(word_size,
!is_survivor,
true /* do_expand */);
if (new_alloc_region != NULL) {
--- 5389,5401 ----
HeapRegion* G1CollectedHeap::new_gc_alloc_region(size_t word_size,
uint count,
InCSetState dest) {
assert(FreeList_lock->owned_by_self(), "pre-condition");
! assert(dest.is_old() || dest.is_young(), "We should only get here with old or young (survivor) as destination.");
!
! if (dest.is_old() || count < g1_policy()->max_survivor_regions()) {
const bool is_survivor = (dest.is_young());
HeapRegion* new_alloc_region = new_region(word_size,
!is_survivor,
true /* do_expand */);
if (new_alloc_region != NULL) {
< prev index next >