RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v15]
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Mar 29 23:52:04 UTC 2023
On Wed, 29 Mar 2023 08:55:08 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> API changes for the FFM API (third preview)
>>
>> Specdiff:
>> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html
>>
>> Javadoc:
>> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Cleanup finality
src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 410:
> 408: * wrapping a native pointer. For instance, if such pointer points to a C struct, the client might prefer to resize the
> 409: * segment unsafely, to match the size of the struct (so that out-of-bounds access will be detected by the API). If the
> 410: * size is known statically, using an address layout with the correct target layout might be preferable.
Suggestion:
* true size of the zero-length memory segment is known statically, using an address layout with the correct target layout might be preferable.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13079#discussion_r1152595828
More information about the nio-dev
mailing list