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

MemorySegment::reinterpret should accept an Arena

    XMLWordPrintable

Details

    Description

      We went back and forth a bit with this and we ended up using MemorySegment.Scope as a parameter for MemorySegment::reinterpret.

      While this has good aesthetic properties (all overloads can be expressed in terms of each other), there is a subtle action at a distance: the segment returned by `reinterpret` has the same confinement properties as that of the arena to which the scope belongs to. That is, from an API perspective, it's as if the scope also carried some extra confinement properties that are not visible.

      For these reasons, we should change the signature of the method to just accept an arena.

      Attachments

        Issue Links

          Activity

            People

              mcimadamore Maurizio Cimadamore
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: