RFR: 8236926: Concurrently uncommit memory in G1 [v7]

Thomas Schatzl tschatzl at openjdk.java.net
Wed Nov 18 10:46:12 UTC 2020


On Fri, 13 Nov 2020 12:15:58 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> src/hotspot/share/gc/g1/g1UncommitRegionTask.cpp line 107:
>> 
>>> 105: 
>>> 106:   // Each execution is limited to uncommit at most 256M worth of regions.
>>> 107:   static const uint region_limit = (uint) (256 * M / G1HeapRegionSize);
>> 
>> Why 256M? Better include some motivation in the comments.
>
> 256M is just a "reasonable" limit that I picked to get short enough invocations. I updated the comment a bit.

One suggestion I have is to make this a static constant in the class declaration not dig it up somewhere in the code.

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

PR: https://git.openjdk.java.net/jdk/pull/1141


More information about the hotspot-dev mailing list