[foreign-memaccess+abi] Integrated: 8310820: Remove MemorySegment::segmentOffset
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Jun 26 13:18:21 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).
This pull request has now been integrated.
Changeset: 5cc83bc3
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.org/panama-foreign/commit/5cc83bc330e3deefc4dd37bd0185a1d54c17c6c0
Stats: 54 lines in 4 files changed: 8 ins; 42 del; 4 mod
8310820: Remove MemorySegment::segmentOffset
Reviewed-by: jvernee
-------------
PR: https://git.openjdk.org/panama-foreign/pull/841
More information about the panama-dev
mailing list