RFR: 8253420: Refactor HeapRegionManager::find_highest_free [v2]
Albert Mingkun Yang
ayang at openjdk.java.net
Tue Jan 26 09:12:54 UTC 2021
On Sat, 23 Jan 2021 14:03:13 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> I would prefer not having side effect in the condition. At first glance, it's not obvious how many iteration the loop entails, `length` or `length - 1`?
>
> Avoiding side effects is normally good, but in this case I think it actually make the whole intent of the code clearer. We could add to the comment that we loop backwards through all reserved regions to make it clear what the bound is.
Updated as suggested, since you both think it's better.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2193
More information about the hotspot-gc-dev
mailing list