RFR: 8330076: [NMT] add/make a mandatory MEMFLAGS argument to family of os::reserve/commit/uncommit memory API [v7]

Afshin Zafari azafari at openjdk.org
Thu Apr 18 09:03:00 UTC 2024


On Wed, 17 Apr 2024 11:59:01 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   alignment in coding style changed.
>
> src/hotspot/share/runtime/os.hpp line 471:
> 
>> 469:   // vm_exit_out_of_memory() with the specified mesg.
>> 470:   static void   commit_memory_or_exit(char* addr, size_t bytes,
>> 471:                                       bool executable, const char* mesg, MEMFLAGS flag);
> 
> I think that we should change the parameter order here, so that it is like `commit_memory` and then the extra mesg param goes with the `_or_exit` part (if that makes sense).
> Suggestion:
> 
>                                       bool executable, MEMFLAGS flag, const char* mesg);

Changed the order.
Note that, now it is only the `commit_memory_or_exit` in `os.hpp` that the MEMFLAGS is not the last param.

> src/hotspot/share/runtime/os.hpp line 522:
> 
>> 520:                            MEMFLAGS flag,
>> 521:                            bool read_only = false,
>> 522:                            bool allow_exec = false);
> 
> params layout style.

Fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18745#discussion_r1570311465
PR Review Comment: https://git.openjdk.org/jdk/pull/18745#discussion_r1570311935


More information about the shenandoah-dev mailing list