RFR: 8253650: Cleanup: remove alignment_hint parameter from os::reserve_memory [v3]
Thomas Stuefe
stuefe at openjdk.java.net
Thu Oct 1 12:13:01 UTC 2020
> Hi all,
>
> since ancient times os::reserve_memory() carried around an "alignment_hint" parameter. It was undocumented but from the
> name it suggests it would cause os::reserve_memory() to try to align the start of the mapping to a given alignment.
> However, the only platform ever doing anything with this parameter was AIX, and there only in mmap() mode. All other
> platforms ignored the parameter. So it can be removed, provided we fix the AIX case.
> Notes:
> - if one really needs alignment memory, there is os::reserve_memory_aligned() which guarantees the alignment. It will do
> the usual over-reserving-and-chopping-away to do that.
> - On AIX there is a second reason why we align the mmap() result pointer to 64K, since we "fake" 64K pages in some
> places. I disentangled that alignment handling from the caller provided alignment.
> - This affects os::reserve_memory() as well as the new os::reserve_memory_with_fd()
> - I also fixed comments in virtualSpace.cpp which do not apply anymore after JDK-8253638
>
> Tests: tier1, manual builds and tests on AIX
Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
Update comment in os_posix.cpp
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/430/files
- new: https://git.openjdk.java.net/jdk/pull/430/files/d02225e7..b48c782a
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=430&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=430&range=01-02
Stats: 7 lines in 1 file changed: 0 ins; 3 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/430.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/430/head:pull/430
PR: https://git.openjdk.java.net/jdk/pull/430
More information about the hotspot-dev
mailing list