RFR: 8335091: NMT: VMATree reserve_mapping and commit_mapping APIs need MEMFLAGS while un/-committing API has no MEMFLAGS arg [v4]

Johan Sjölen jsjolen at openjdk.org
Tue Sep 17 12:49:13 UTC 2024


On Tue, 3 Sep 2024 16:25:03 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   invalid cases of register_mapping are handled.
>
> src/hotspot/share/nmt/vmatree.hpp line 192:
> 
>> 190: 
>> 191:  public:
>> 192:   SummaryDiff reserve_mapping(position from, position sz, const RegionData& metadata) {
> 
> In
> 
> `SummaryDiff register_mapping(position A, position B, StateType state, const RegionData& metadata, bool copy_flag = false);`
> 
> `position B` is clearly a position of its own, however, in
> 
> `SummaryDiff reserve_mapping(position from, position sz, const RegionData& metadata)`
> 
> `position sz` is **size** or **delta**. We should rename the parameter to reflect that intended functionality better.
> 
> I would probably prefer to see us introduce:
> 
> `using position_size = size_t;`
> 
> and use as appropriate, instead, of forcing everything to be `position`, to help keep the API usage straight.

Hi, I did this change in https://github.com/openjdk/jdk/pull/20994

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20330#discussion_r1763182919


More information about the hotspot-runtime-dev mailing list