code: public void flush() {
          top = null;
          defaultEntry.reset(0);
          first.reset(minQueueLength);
  
          for (int i = memregs.length - 1; i > 0; i--) {
              MemReg mr = memregs[i];
              mr.in = mr.out = -1;
          }
          /*
          for (int i = memregs.length - 1; i > 0; i--) {
              MemReg mr = memregs[i];
              mr.in = mr.out = -1;
          }*/
          called = false;
      }
docs: Resets the internal state.