Java UseConcMarkSweepGC 已弃用,它的替代品是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/52239570/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 00:23:26  来源:igfitidea点击:

UseConcMarkSweepGC is deprecated, what is its replacement?

javagarbage-collectionjvmdeprecatedcompiler-flags

提问by hoosierEE

A java program is giving this warning, with JRE 10.0.2:

使用 JRE 10.0.2 的 Java 程序发出此警告:

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

What is the recommended replacement for this switch?

此开关的推荐替代品是什么?

采纳答案by Eugene

Dropping support for CMS and then removing the CMS code, or at least more thoroughly segregating it, will reduce the maintenance burden of the GC code base and accelerate new development. The G1 garbage collector is intended, in the long term, to be a replacement for most uses of CMS.

放弃对 CMS 的支持,然后移除 CMS 代码,或者至少更彻底地将其隔离,将减少 GC 代码库的维护负担并加速新的开发。从长远来看,G1 垃圾收集器旨在替代 CMS 的大多数用途。

From the Official JEP

来自官方 JEP