< prev index next >

src/share/vm/memory/collectorPolicy.cpp

Print this page
rev 8331 : 8077842: Remove the level parameter passed around in GenCollectedHeap
Reviewed-by:

@@ -748,11 +748,11 @@
     // Do an incremental collection.
     gch->do_collection(false            /* full */,
                        false            /* clear_all_soft_refs */,
                        size             /* size */,
                        is_tlab          /* is_tlab */,
-                       number_of_generations() - 1 /* max_level */);
+                       Generation::Old  /* max_generation */);
   } else {
     if (Verbose && PrintGCDetails) {
       gclog_or_tty->print(" :: Trying full because partial may fail :: ");
     }
     // Try a full collection; see delta for bug id 6266275

@@ -761,11 +761,11 @@
     // such allocation moved out of the safepoint path.
     gch->do_collection(true             /* full */,
                        false            /* clear_all_soft_refs */,
                        size             /* size */,
                        is_tlab          /* is_tlab */,
-                       number_of_generations() - 1 /* max_level */);
+                       Generation::Old  /* max_generation */);
   }
 
   result = gch->attempt_allocation(size, is_tlab, false /*first_only*/);
 
   if (result != NULL) {

@@ -789,11 +789,11 @@
 
     gch->do_collection(true             /* full */,
                        true             /* clear_all_soft_refs */,
                        size             /* size */,
                        is_tlab          /* is_tlab */,
-                       number_of_generations() - 1 /* max_level */);
+                       Generation::Old  /* max_generation */);
   }
 
   result = gch->attempt_allocation(size, is_tlab, false /* first_only */);
   if (result != NULL) {
     assert(gch->is_in_reserved(result), "result not in heap");
< prev index next >