Mercurial > hg > graal-jvmci-8
diff src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp @ 10293:2958af1d8c5a
Merge
author | jwilhelm |
---|---|
date | Fri, 17 May 2013 06:01:10 +0200 |
parents | f9be75d21404 05a17f270c7e |
children | 6702da6b6082 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp Tue May 14 17:33:07 2013 +0000 +++ b/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp Fri May 17 06:01:10 2013 +0200 @@ -707,10 +707,11 @@ // Cast away const in this case. MutexLockerEx x((Mutex*)&_m, Mutex::_no_safepoint_check_flag); size_t sum = 0; - PerRegionTable * cur = _first_all_fine_prts; - while (cur != NULL) { - sum += cur->mem_size(); - cur = cur->next(); + // all PRTs are of the same size so it is sufficient to query only one of them. + if (_first_all_fine_prts != NULL) { + assert(_last_all_fine_prts != NULL && + _first_all_fine_prts->mem_size() == _last_all_fine_prts->mem_size(), "check that mem_size() is constant"); + sum += _first_all_fine_prts->mem_size() * _n_fine_entries; } sum += (sizeof(PerRegionTable*) * _max_fine_entries); sum += (_coarse_map.size_in_words() * HeapWordSize);