java - UseCMSCompactAtFullCollection 可以在Sun JDK6 中使用吗?

标签 java garbage-collection

我搜索了很多,似乎 UseCMSCompactAtFullCollection 只能在 Sun JDK1.4.1 中使用。对吗?

或者这是JDk1.4.2之后默认的?

最佳答案

来自 1.4.2 faq , 我的大胆

Why is fragmentation a potential problem for the concurrent low pause collector? Normally the concurrent low pause collector does not copy nor compact the live objects. A garbage collection is done without moving the live objects. If fragmentation becomes a problem, allocate a larger heap. In 1.4.2 if fragmentation in the tenured generation becomes a problem, a compaction of the tenured generation will be done although not concurrently. In 1.4.1 that compaction will occur if the UseCMSCompactAtFullCollection option is turned on.

我建议阅读 this entry从 Jon Masamitsu 的博客中获取对正在发生的事情的解释。

关于java - UseCMSCompactAtFullCollection 可以在Sun JDK6 中使用吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7765403/

相关文章:

java - 如何将 "double"值与 JOptionPane.showInputDialog 一起使用

java - Tomcat 服务器在 eclipse 中启动失败

java - 手动入队的弱引用状态如何?

java - 对象内对象的内存分配

java - Junits 的 Guice 和 Mockto

java - 如何使用 Apache POI 从 PDF 中提取原始文本?

java - 从一个线程中退出

.net - 垃圾回收分为哪几代?

garbage-collection - 如何避免 sublime text 2 卡住

javascript - 如何在 Spidermonkey 中创建、处理和销毁 JS::Heap<T> 对象?