I'd like to know what are the experiences with G1 garbage collector in newest JDK? I see NullPointerException
thrown in my program, although code didn't change and behave correctly in earlier JDKs.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I've been running jEdit using:
-Xmx192M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC
for the last couple of days on windows. Haven't experienced anything going wrong or misbehaving.
I also tried running Intellij using the G1 GC, it didn't fair so well. It lasted a couple of hours before crashing in a big pile of mess, a bit optimistic maybe.
回答2:
A garbage collector will only impact the performance of your application, not its correctness. I've been using it for Eclipse, just for fun, and seemed stable.
I would look elsewhere for the source of the exceptions.
回答3:
I tried and experienced no exceptions. But performance of our server dropped about 30%.