RFR: 8292697: ZGC: Hangs when almost out of metaspace memory

Stefan Karlsson stefank at openjdk.org
Wed Aug 24 16:08:25 UTC 2022


On Wed, 24 Aug 2022 15:32:46 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Just style:
>> 1) I wanted to pull this logic out to a function/lambda
>> 2) I wanted to keep the code near its usage
>> 3) I didn't want all ceremony of having to declare the function / or creating a free function taking two extra parameters.
>
> why did it need to be pulled out into a function?  It's just a small amount of code that either is a lambda inline or just code inline? I'm a massive fan of lambdas but I don't see the purpose here.

I think code gets easier to read if you separate out the two concerns:
1) What is it you want to check
2) What is it you want to do if that happens

I find that stye of code easier to read, and easier to add precise comments to.

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

PR: https://git.openjdk.org/jdk/pull/9985


More information about the hotspot-dev mailing list