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

Restore stress testing of MemorySegment of foreign API in Kitchesink

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b28

      Description

      The e-mail from maurizio.cimadamore@oracle.com:

      I'm writing this email as I recall that we disabled some tests in JDK 15, because a method, namely MemorySegment::acquire was removed from the API, so segments were not accessible from multiple threads.

      This functionality is now back in the recently pushed code, but in a new form - instead of acquiring segments, you just have to "share" them - e.g:

      MemorySegment segment = MemorySegment.allocateNative(100).share();

      The segment created above does NOT have any owner thread and can thus be accessed and closed (safely!) from multiple threads.

      Since we rely on a lot of black magic to support this (:-) ) I think it would be a good idea to edit the acquire-based test and move them to the new API, so that we can stress test this feature.

        Attachments

          Activity

            People

            Assignee:
            lmesnik Leonid Mesnik
            Reporter:
            lmesnik Leonid Mesnik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: