public class GcTest {
/**
* [color=red]-Xloggc:d:\gc.log[/color] -Xms10m -Xmx10m
* @param args
* @throws InterruptedException
*/
public static void main(String[] args) throws InterruptedException {
while(true){
Thread.sleep(1000);
byte[] _byte= new byte[1024*1024*6];
System.err.println(_byte);
}
}
}
jvm GC日志输出
最新推荐文章于 2024-05-04 17:13:37 发布
本文探讨了使用Java GC测试类进行内存管理实践,详细解释了-Xloggc参数的作用及-Xms和-Xmx参数配置的重要性。
4018

被折叠的 条评论
为什么被折叠?



