When I set Xmx value,I found heap init value is 0 through Java API, I set Xms and Xmx values ,I found heap init value is not 0 through Java API, I not set Xms and Xmx values ,I found heap init value is not 0 through Java API.
- -Xmx512M
- -Xms256M -Xmx512M
- not set
I found that JDK1.5 would have this problem. MemoryUsage heapMemoryUsage = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage(); heapMemoryUsage.getInit();
I want to know the principle