< prev index next >

src/share/vm/gc/g1/g1FromCardCache.cpp

Print this page
rev 9771 : imported patch 8145667-move-fromcardcache-into-separate-files
rev 9772 : imported patch 8145671-rename-fromcardcache-to-g1fromcardcache
rev 9773 : imported patch 8145672-remove-dependency-of-g1fromcardcache-to-heapregionremset
rev 9774 : [mq]: 8145672-jmasa-comments

@@ -46,13 +46,14 @@
 
 void G1FromCardCache::invalidate(uint start_idx, size_t new_num_regions) {
   guarantee((size_t)start_idx + new_num_regions <= max_uintx,
             "Trying to invalidate beyond maximum region, from %u size " SIZE_FORMAT,
             start_idx, new_num_regions);
-  for (uint i = 0; i < G1RemSet::num_par_rem_sets(); i++) {
     uint end_idx = (start_idx + (uint)new_num_regions);
     assert(end_idx <= _max_regions, "Must be within max.");
+
+  for (uint i = 0; i < G1RemSet::num_par_rem_sets(); i++) {
     for (uint j = start_idx; j < end_idx; j++) {
       set(i, j, InvalidCard);
     }
   }
 }
< prev index next >