Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8360206

Refactor ReferenceProcessor::balance_queues

XMLWordPrintable

    • gc

      The current implementation separated logic for overfilled vs. unprocessed queues using a `move_all` flag, resulting in a somewhat convoluted loop structure.
      Using a single `remaining_to_move` in the inner loop instead.

      Additionally, since we are iterating to-queues from index zero, the to-index should never exceed `_num_queues`. Therefore, the modulus operation in `to_idx = (to_idx + 1) % _num_queues;` is redundant.

            ayang Albert Yang
            ayang Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: