RFR: 8267341: macos attempt_reserve_memory_at(arg1, arg2, true) failure [v4]
David Holmes
david.holmes at oracle.com
Sat Jan 8 01:00:39 UTC 2022
On 8/01/2022 1:44 am, Gerard Ziemski wrote:
> On Thu, 6 Jan 2022 22:59:53 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
>>> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>>>
>>> rename can_alloc_executable_memory to can_reserve_executable_memory
>>
>> test/hotspot/gtest/runtime/test_os.cpp line 379:
>>
>>> 377: #ifdef __APPLE__
>>> 378: // Workaround: try reserving memory with executable flag set to True
>>> 379: // to figure out if such operation is supported on this macOS version
>>
>> This comment really belongs on can_reserve_executable_memory now.
>
> I'd prefer to have a comment at the place of the workaround. How about changing it slightly to avoid implementation details like so:
>
>
> // Workaround: try reserving executable memory to figure out
> // if such operation is supported on this macOS version
I still think can_alloc_executable_memory requires a comment to explain
what it is doing.
David
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/6960
More information about the hotspot-runtime-dev
mailing list