How often is the GC executed?(GC 多久执行一次?)
问题描述
Java:在 JVM 中执行 GC 的频率是多少?每一秒?每一分钟?还是随机取决于内存大小?我只是想有个主意.
Java: How often is the GC executed in JVM? Every second? Every minute? Or is it random depending on the memory size? I just want to have an idea.
谢谢.
推荐答案
这取决于内存使用情况和存储对象的堆.看看这个
It depends on the memory usage and the heap in which the objects are stored. Look at this
http://javarevisited.blogspot.com/2011/04/garbage-collection-in-java.html
它不依赖于时间.它仅取决于新的内存要求和可用内存.
It does not depend on time. It only depends on the new memory requirements and available memory.
这篇关于GC 多久执行一次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:GC 多久执行一次?


基础教程推荐
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- 降序排序:Java Map 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01