If I don't set -Xmx of the Java application in eclipse. Eclipse will launch it with a default heap size which is related to the physical memory. I want to know how to compute this default value.
Asked
Active
Viewed 3,585 times
2
-
possible duplicate of [What is the default maximum heap size for Sun's JVM from Java SE 6?](http://stackoverflow.com/questions/2915276/what-is-the-default-maximum-heap-size-for-suns-jvm-from-java-se-6) – Brendan Long Aug 23 '13 at 03:05
-
@BrendanLong. Thanks, "Smaller than 1/4th of the physical memory" is correct. That's really a duplicated question. – Lijie Xu Aug 23 '13 at 03:41
1 Answers
0
You can use MemoryMXBean to get JVM init and max memory and RuntimeMXBean to get JVM arguments.

Evgeniy Dorofeev
- 133,369
- 30
- 199
- 275