RFR: JDK-8313319: [linux] mmap should use MAP_FIXED_NOREPLACE if available [v2]

Thomas Stuefe stuefe at openjdk.org
Wed Aug 23 09:14:14 UTC 2023


On Wed, 23 Aug 2023 06:13:17 GMT, David Holmes <dholmes at openjdk.org> wrote:

> This seems reasonable. I'd like to take it for a spin through our CI though. Thanks.

Thank you, David!

> test/hotspot/gtest/runtime/test_os.cpp line 930:
> 
>> 928: TEST_VM(os, reserve_at_wish_address_shall_not_replace_mappings_smallpages) {
>> 929:   char* p1 = os::reserve_memory(M, false, mtTest);
>> 930:   ASSERT_NE(p1, (char*)nullptr);
> 
> Do you need casts on nullptr?

You are right, it does not. That is an advantage to NULL then. This means I can remove the ASSERT_NULL I introduced a while back.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15170#issuecomment-1689447029
PR Review Comment: https://git.openjdk.org/jdk/pull/15170#discussion_r1302602785


More information about the hotspot-runtime-dev mailing list