Java 8: 从永久代到原空间

原文链接:https://www.javacodegeeks.com/2013/02/java-8-from-permgen-to-metaspace.html

        您可能已经注意到,JDK 8 早期访问版本现在可以下载了。这意味着Java开发人员可以开始使用Java 8的一些新的语言和运行时特性进行试验。其中一个特性是完全删除了永久代(PermGen),这是自JDK 7发布以来Oracle宣布的。例如,从JDK 7开始,字符串内部池已经从PermGen空间中删除,JDK 8发行版宣告了它的退役。本文将分享到关于PermGen最新继任者--Metaspace的信息。我们还将比较HotSpot 1.7和HotSpot 1.8 (b75)在执行Java程序“泄漏”类元数据对象时的运行时行为。关于Metaspace的最终规范、调优标志和文档会在Java 8正式发布后可以获得。

        As you may be aware, the JDK 8 Early Access is now available for download. This allows Java developers to experiment with some of the new language and runtime features of Java 8. One of these features is the complete removal of the Permanent Generation (PermGen) space which has been announced by Oracle since the release of JDK 7. Interned strings, for example, have already been removed from the PermGen space since JDK 7. The JDK 8 release finalizes its decommissioning. This article will share the information that we found so far on the PermGen successor: Metaspace. We will also compare the runtime behavior of the HotSpot 1.7 vs. HotSpot 1.8 (b75) when executing a Java program “leaking” class metadata objects. The final specifications, tuning flags and documentation around Metaspace should be available once Java 8 is officially released.

原空间:

一个新的记忆空间诞生

        JDK 8热点JVM现在使用本地内存代表类元数据,称为Metaspace; 类似于Oracle JRockit和IBM JVM。好消息是,它意味着不会再有 java.lang.OutOfMemoryError: PermGen 永久代空间问题,不需要再调优和监视这个内存空间…虽然这个更改在默认情况下是不可见的,但是接下来我们将向您展示,您仍然需要担心类元数据内存占用。请记住,这个新特性并不能神奇地消除类和类加载器的内存泄漏问题。您将需要使用不同的方法并遵守新的命名规约来跟踪这些问题。我建议您阅读PermGen移除总结和Jon对此主题的评论

Metaspace:

A new memory space is born

The JDK 8 HotSpot JVM is now using native memory for the representation of class metadata and is called Metaspace;  similar to the Oracle JRockit and IBM JVM’s. The good news is that it means no more java.lang.OutOfMemoryError: PermGen space problems and no need for you to tune and monit

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值