Java垃圾收集器

标签 java garbage-collection

Possible Duplicate:
Java garbage collector - When does it collect?

当人们说 Java 中的垃圾收集器降低了整个应用程序的速度时,他们真正的意思是什么?垃圾收集器不是只有在对象被释放时才会触发吗?请帮助我理解。谢谢!

最佳答案

看看http://developers.sun.com/mobility/midp/articles/garbage/

As Java technology becomes more and more pervasive in the telecommunications (telco) industry, understanding the behavior of the garbage collector becomes more important. Typically, telco applications are near-real-time applications. Delays measured in milliseconds are not usually a problem, but delays of hundreds of milliseconds, let alone seconds, can spell trouble for applications of this kind. Quite simply, sub-optimal performance translates directly into loss of revenue.

基本上,如果垃圾收集器压缩一个小堆,那么延迟很短,但如果您生成了大量垃圾,并且有一个很大的可到达对象图,您就会看到很大的延迟。新的垃圾收集算法(分代/增量 GC)在一定程度上缓解了这一问题,但调整 GC 仍然有些玄学。

关于Java垃圾收集器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6078929/

相关文章:

memory - apache-storm频繁Full GC

java - Java 中的多级(嵌套?)Jlist

Java 重写抽象接口(interface)方法

imap_unordered 中的 Python 垃圾收集

c# - 未引用的事件 DispatcherTimer 和垃圾收集器

c# - 终结器在其对象仍在使用时启动

javascript - knockout : remove all subscriptions from an observable

java - 在父级或祖先上下文中找不到方法

java - 为什么按位左移在 Python 和 Java 中返回不同的结果?

java - Maven 中的库引用不正确,.m2\repository 出现两次