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

[lworld] New Unsafe API for special array creation needed by VarHandle

XMLWordPrintable

      The current implementation of VarHandle to support CAS operations requires the allocation of arrays of a given layout. There's no API to allocate a flat array that take a layout requirement in argument. This leads to an inefficient implementation where the VarHandle may have to create several arrays before finding the one with the correct layout.
      The solution is to provide a new Unsafe method that can use a layout argument (as returned by Unsafe.fieldLayout() or Unsafe.arrayLayout()).

            fparain Frederic Parain
            fparain Frederic Parain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: