PermGen空间的意义 [英] Significance of PermGen Space

查看:102
本文介绍了PermGen空间的意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PermGen空间在java中有什么意义?

What is the significance of PermGen space in java?

推荐答案

PermGen空间是为长期对象保留的 - 主要是 Class ClassLoader 加载的对象。除非在非常特殊的情况下(特别是当加载这些类的 ClassLoader 超出范围时),PermGen不会被垃圾收集。

PermGen space is reserved for long-term objects - mostly Class objects loaded by the ClassLoader. PermGen will not be garbage collected except under very special circumstances (specifically, when the ClassLoader that loaded those classes goes out of scope).

这是一个垃圾收集优化 - 如果我们不希望垃圾收集的对象被单独存储,它会压缩存储其余对象的空间,这导致垃圾收集器的工作量减少。

This is a garbage collection optimization - if objects that we don't expect to be garbage collected are stored separately, it compacts the space where the rest of the objects are stored, which leads to less work for the garbage collector.

这篇关于PermGen空间的意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆