本文介绍了PermGen和堆,差异及其意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友

您能给我Heap和PermGen的意义,区别和用途吗?另外,最好分别知道在哪个类中加载了这些类.

Can you please give me significance, difference and uses for Heap and PermGen.Also it would be good to know what class are loaded in them respectively.

与Java VM规范相关的说明将非常有帮助

Explanation related to Java VM specification would be really helpful

谢谢普尼思

推荐答案

内存(堆)是分代管理的,或者是拥有不同年龄对象的内存池.当世代填满时,垃圾收集会在每个世代中发生.对象在一代中分配给较年轻的对象或young generation,并且由于婴儿死亡率,大多数对象在此处死亡.

Memory(Heap) is managed in generations, or memory pools holding objects of different ages. Garbage collection occurs in each generation when the generation fills up. Objects are allocated in a generation for younger objects or the young generation, and because of infant mortality most objects die there.

构造任何新对象时,它都会进入Young Generation一部分的伊甸园空间.

When any new object is constructed it goes to Eden space which is a part of Young Generation.

如果对象在一段时间后仍然存在,则会转到tenured generation长期存在的对象所在的地方.

If object is still alive after some time it goes to tenured generation where long lived objects lie.

如果应该保留对象,直到存在过度处理,则将对象移至Perm Generation.Java classes存储在永久代中.

If object is supposed to live until over process exist then object is moved to Perm Generation.Java classes are stored in the permanent generation.

这篇关于PermGen和堆,差异及其意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 06:34