标签:
可以将jvm粗略分为以下部分:
是在jvm启动的时候分配的
-Xmx<size>:设置堆的最大大小.
-Xms<size>:设置初始的对大小.
默认情况下,堆的最大大小是64MB,堆是否是固定大小,可扩展都是有gc策略决定的.
可以通过:-XX:MaxPermSize
设置堆的大小,如:-XX:MaxPermSize=128m.
可以在"Memory‘下查看heap和non-heap的信息:
Used heap memory consists of live and dead objects.
Live objects are accessible by the application and will not be a subject of garbage collection.
Dead objects are those which will never be accessible by the application but have not been collected yet by the garbage collector.
Class list同时显示live and dead objects,可以通过查看gc发生时对象的数量变化来分析情况.
ref: http://www.yourkit.com/docs/kb/sizes.jsp
http://blog.csdn.net/autofei/article/details/7456213
标签:
原文地址:http://www.cnblogs.com/listened/p/4246101.html