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

Improve object arraycopy to do single-loop

XMLWordPrintable

    • gc
    • generic
    • generic

      Currently, object arraycopies requires up to 3 scans of the array:
      1. Pre-barrier scans the dst array for SATB
      2. Actual copy (using blit transfer)
      3. Post-barrier scans the dst array again to update any from-space refs to to-space

      This can be folded into a single loop which does the above per-element, and ensures to-space invariant before actually storing the object into the dst array. The latter would help other code that currently needs to deal with (temporary) from-space refs in arrays. See JDK-8222766.

            rkennke Roman Kennke
            rkennke Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: