Exemplo n.º 1
0
 /** Sweep through the large pages, releasing all superpages on the "from space" treadmill. */
 private void sweepLargePages(boolean sweepNursery) {
   while (true) {
     Address cell = sweepNursery ? treadmill.popNursery() : treadmill.pop();
     if (cell.isZero()) break;
     release(getSuperPage(cell));
   }
   if (VM.VERIFY_ASSERTIONS)
     VM.assertions._assert(sweepNursery ? treadmill.nurseryEmpty() : treadmill.fromSpaceEmpty());
 }
Exemplo n.º 2
0
 /**
  * A new collection increment has completed. For the mark-sweep collector this means we can
  * perform the sweep phase.
  */
 public void release(boolean fullHeap) {
   // sweep the large objects
   sweepLargePages(true); // sweep the nursery
   if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(treadmill.nurseryEmpty());
   if (fullHeap) sweepLargePages(false); // sweep the mature space
 }