我搜索了很多,似乎 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/