RFR: 8265239: Shenandoah: Shenandoah heap region count could be off by 1

Aleksey Shipilev shade at openjdk.java.net
Fri Apr 16 07:45:36 UTC 2021


On Thu, 15 Apr 2021 00:06:05 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> henandoah uses MaxHeapSize to calculate region size, then aligns up heap size to region size alignment, but when it calculates region count, it does not take alignment into account, that may result 1 region short than actual count.
> 
> MaxHeapSize eventually aligns to HeapAlignment (which is region size in Shenandoah case) in GCArguments::initialize_heap_flags_and_sizes(), but it is too late.
> 
> Test:
> - [x] hotspot_gc_shenandoah

Looks fine.

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

Marked as reviewed by shade (Reviewer).

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



More information about the hotspot-gc-dev mailing list