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

Remove MemorySegment::segmentOffset

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • repo-panama
    • core-libs

      This method was added a long time ago, mostly to support the use case of "rebasing" a safe segment over the unsafe "everything" segment. We have other ways to express these use cases in the current API.

      On top of that, this method can return negative offsets, which would then lead to failures when used with access APIs.

      Finally, since we have unified memory segments with addresses, computing relative offset between segment is fairly easy (just subtract the segment addresses).

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

              Created:
              Updated:
              Resolved: