I have reviewed the answer to how to get the min and max heap size settings of a JVM from within a Java program which was helpful, but the accepted answer doesn't appear to answer half of the question. In essence, I want to report the -Xms and -Xmx settings that were used when the JVM was launched.
These are the mappings between values you're looking for:
-Xmx=Runtime.getRuntime().maxMemory()
-Xms=Runtime.getRuntime().totalMemory()
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With