RFR: 8329997: Add MemorySegment::reinterpretate overloads for alignment constraints
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Apr 10 15:30:10 UTC 2024
On Wed, 10 Apr 2024 12:49:11 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> This PR proposes to add two overloads `MemorySegment::reinterpretate` to allow aligned reinterpretation.
Should we add the full set of overloads? E.g.
reinterpret(arena, cleanup)
reinterpret(size)
reinterpret(size, arena, cleanup)
reinterpret(size, align) // this is missing
reinterpret(size, align, arena, cleanup) // this is missing
reinterpret(layout)
reinterpret(layout, arena, cleanup)
In other places (e.g. `asSlice`) we accept size/align where we also accept a layout
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18717#issuecomment-2047856585
More information about the core-libs-dev
mailing list