src/share/vm/gc_implementation/g1/heapRegion.cpp

changeset 7009
3f2894c5052e
parent 6992
2c6ef90f030a
child 7050
6701abbc4441
     1.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.cpp	Mon Jul 21 09:59:54 2014 +0200
     1.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp	Mon Jul 21 10:00:31 2014 +0200
     1.3 @@ -380,18 +380,7 @@
     1.4  }
     1.5  
     1.6  CompactibleSpace* HeapRegion::next_compaction_space() const {
     1.7 -  // We're not using an iterator given that it will wrap around when
     1.8 -  // it reaches the last region and this is not what we want here.
     1.9 -  G1CollectedHeap* g1h = G1CollectedHeap::heap();
    1.10 -  uint index = hrs_index() + 1;
    1.11 -  while (index < g1h->n_regions()) {
    1.12 -    HeapRegion* hr = g1h->region_at(index);
    1.13 -    if (!hr->isHumongous()) {
    1.14 -      return hr;
    1.15 -    }
    1.16 -    index += 1;
    1.17 -  }
    1.18 -  return NULL;
    1.19 +  return G1CollectedHeap::heap()->next_compaction_region(this);
    1.20  }
    1.21  
    1.22  void HeapRegion::note_self_forwarding_removal_start(bool during_initial_mark,

mercurial