RFR: 8312180: (bf) MappedMemoryUtils passes incorrect arguments to msync (aix)
Alan Bateman
alanb at openjdk.org
Tue Jul 18 16:08:14 UTC 2023
On Tue, 18 Jul 2023 15:52:53 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> It boils down to [Dynamic Variable Page Sizes](https://www.ibm.com/docs/en/aix/7.2?topic=support-dynamic-variable-page-size), which is an AIX feature. The larger page size returned by Unsafe::pageSize is the system page size (by default 64 KiB). The page size required by msync (and returned by sysconf(_SC_PAGESIZE) is the fine-grained page size (by default 4 KiB).
sysconf is usually documented to return values that don't change during the lifetime of the process. Does this AIX feature mean that sysconf(_SC_PAGESIZE) may initially return 4k but 64k some time later? If so, what does this mean for MappedByteBuffer.load/isLoaded/force and the equivalent methods on MemorySegment as they use the page size to compute the base address and offset. I see this bug report was because a MemorySegment test is failing but it hints that there may be long standing issues with MappedByteBuffer too.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14904#issuecomment-1640517925
More information about the nio-dev
mailing list