[foreign-memaccess+abi] RFR: 8310820: Remove MemorySegment::segmentOffset
Jorn Vernee
jvernee at openjdk.org
Mon Jun 26 12:32:28 UTC 2023
On Fri, 23 Jun 2023 18:23:41 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> 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).
Marked as reviewed by jvernee (Committer).
-------------
PR Review: https://git.openjdk.org/panama-foreign/pull/841#pullrequestreview-1498408465
More information about the panama-dev
mailing list