我们使用 -Xms 等于 -Xmx valuem 启动 java 进程,例如:
-Xms1500m -Xmx1500m -Dos.heap.max=1500m -verbose:gc -XX:MaxPermSize=256m
由于某种原因,堆在运行时正在改变......:
[GC 624542K->464935K(1472000K), 0.0647450 secs] Wed Jul 3 15:58:23 2013
[GC 808811K->813332K(1472000K), 0.1407890 secs] Wed Jul 3 15:58:23 2013
[Full GC 813332K->636599K(1472000K), 0.7913590 secs] Wed Jul 3 15:58:24 2013
[GC 1016090K->956043K(1258752K), 0.1209670 secs] Wed Jul 3 15:58:24 2013
[Full GC 956043K->955974K(1258752K), 0.4132560 secs] Wed Jul 3 15:58:25 2013
[Full GC 1126726K->1122269K(1258752K), 0.4376340 secs] Wed Jul 3 15:58:25 2013
[Full GC 1126726K->1115353K(1258752K), 0.8102960 secs] Wed Jul 3 15:58:26 2013
问题是为什么堆内存在运行时会发生变化......?