RFR: 8286637: (fc) Memory mapped regions bigger than 2GB do not work correctly on Windows
Brian Burkhalter
bpb at openjdk.java.net
Thu May 12 20:58:50 UTC 2022
On Thu, 12 May 2022 20:49:35 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Cast the last parameter `dwNumberOfBytesToMap` of `MapViewOfFile()` to a `SIZE_T`, not a `DWORD`, to avoid truncation.
>
> test/jdk/java/nio/channels/FileChannel/LargeMapTest.java line 25:
>
>> 23:
>> 24: import jdk.incubator.foreign.MemorySegment;
>> 25: import jdk.incubator.foreign.ResourceScope;
>
> Note that the JEP has just been integrated as well, so this package no longer exists. It should be `java.lang.foreign` now. `ResourceScope` was renamed to `MemorySession`, `newSharedScope` should now be `openShared`, and the test will need `@enablePreview` as well.
>
> (I think that's all that's needed)
Thanks: I was not current on that.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8686
More information about the nio-dev
mailing list