RFR: 8286637: (fc) Memory mapped regions bigger than 2GB do not work correctly on Windows [v2]
Alan Bateman
alanb at openjdk.java.net
Sat May 14 08:03:50 UTC 2022
On Thu, 12 May 2022 23:27:30 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Cast the last parameter `dwNumberOfBytesToMap` of `MapViewOfFile()` to a `SIZE_T`, not a `DWORD`, to avoid truncation.
>
> Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - 8286671: Update test pursuant to JEP 424 integration
> - Merge
> - 8286637: Update test with try-with-resources and to print less
> - 8286637: (fc) Memory mapped regions bigger than 2GB do not work correctly on Windows
test/jdk/java/nio/channels/FileChannel/LargeMapTest.java line 58:
> 56: p.toFile().deleteOnExit();
> 57: try (RandomAccessFile raf = new RandomAccessFile(FILE, "rw");) {
> 58: raf.setLength(LENGTH); //~8gb
This is FileChannel test so I'm curious why it uses RAF here. I would have expected it to use FileChannel's position(LENGTH) and then write something as the spec is that this doesn't extend, a later write will extend it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8686
More information about the nio-dev
mailing list