RFR: 8308507: G1: GClocker induced GCs can starve threads requiring memory leading to OOME [v4]

Thomas Schatzl tschatzl at openjdk.org
Thu Jun 1 11:25:12 UTC 2023


On Thu, 1 Jun 2023 09:52:41 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

>> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 1049:
>> 
>>> 1047:   bool *expect_null_alloc_regions = (bool*)alloca(active_numa_nodes * sizeof(bool));
>>> 1048:   for (uint i = 0; i < active_numa_nodes; i++) {
>>> 1049:     expect_null_alloc_regions[i] = expect_null_mutator_alloc_region;
>> 
>> AFAICS, this array is just for assert eventually, right? If so, how useful is that assert? Can it be removed?
>
> I wasn't in position to determine that, so I went with keeping it. Removing it would make the code a lot cleaner and also avoid the use of alloca, but again, I need guidance on the removing it part

I'm good with this change removing it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14077#discussion_r1213003682


More information about the hotspot-gc-dev mailing list