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

Print this page

        

@@ -3748,11 +3748,11 @@
   // Decide what the target size is, depending whether we're going to
   // drain it partially (so that other tasks can steal if they run out
   // of things to do) or totally (at the very end).
   size_t target_size;
   if (partially) {
-    target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
+    target_size = MIN2((_task_queue->max_elems()/3), GCDrainStackTargetSize);
   } else {
     target_size = 0;
   }
 
   if (_task_queue->size() > target_size) {

@@ -4586,11 +4586,11 @@
 size_t G1PrintRegionLivenessInfoClosure::get_hum_bytes(size_t* hum_bytes) {
   size_t bytes = 0;
   // The > 0 check is to deal with the prev and next live bytes which
   // could be 0.
   if (*hum_bytes > 0) {
-    bytes = MIN2(HeapRegion::GrainBytes, *hum_bytes);
+    bytes = MIN2(HeapRegion::GrainBytes, (size_t)*hum_bytes);
     *hum_bytes -= bytes;
   }
   return bytes;
 }