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

changeset 7018
a22acf6d7598
parent 6996
f3aeae1f9fc5
child 7019
755930f931e3
equal deleted inserted replaced
7017:c512f38a5139 7018:a22acf6d7598
2955 } 2955 }
2956 cur = next; 2956 cur = next;
2957 } 2957 }
2958 } 2958 }
2959 2959
2960 CompactibleSpace* G1CollectedHeap::first_compactible_space() { 2960 HeapRegion* G1CollectedHeap::next_compaction_region(const HeapRegion* from) const {
2961 return n_regions() > 0 ? region_at(0) : NULL; 2961 // We're not using an iterator given that it will wrap around when
2962 } 2962 // it reaches the last region and this is not what we want here.
2963 2963 for (uint index = from->hrs_index() + 1; index < n_regions(); index++) {
2964 HeapRegion* hr = region_at(index);
2965 if (!hr->isHumongous()) {
2966 return hr;
2967 }
2968 }
2969 return NULL;
2970 }
2964 2971
2965 Space* G1CollectedHeap::space_containing(const void* addr) const { 2972 Space* G1CollectedHeap::space_containing(const void* addr) const {
2966 Space* res = heap_region_containing(addr); 2973 Space* res = heap_region_containing(addr);
2967 return res; 2974 return res;
2968 } 2975 }

mercurial