-XX:+PrintFlagFinal shows MaxHeapSize := 0 when heap size is a multiple of 4 GiB

Solution Unverified - Updated -

Issue

-XX:+PrintFlagFinal flag shows MaxHeapSize := 0 when heap size is a multiple of 4 GiB as follows.

C:\>java -XX:+PrintFlagsFinal -Xmx4g -version | findstr MaxHeapSize
    uintx MaxHeapSize                              := 0                                   {product}
    uintx ShenandoahSoftMaxHeapSize                 = 0                                   {manageable}
openjdk version "1.8.0_322"
OpenJDK Runtime Environment (build 1.8.0_322-b06)
OpenJDK 64-Bit Server VM (build 25.322-b06, mixed mode)

Environment

  • OpenJDK
    • 8
  • Windows Server 2019

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content