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

Zhengyu Gu zgu at openjdk.java.net
Fri Apr 16 12:30: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

This pull request has now been integrated.

Changeset: ff5bb8cf
Author:    Zhengyu Gu <zgu at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/ff5bb8cf
Stats:     2 lines in 2 files changed: 1 ins; 0 del; 1 mod

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

Reviewed-by: shade

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

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



More information about the hotspot-gc-dev mailing list