为什么会发生Permgen OutOfMemeoryError? [英] Why does Permgen OutOfMemeoryError occurs?

查看:94
本文介绍了为什么会发生Permgen OutOfMemeoryError?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到今天,我知道permgen空间有一定的限制,并且当此限制用尽时,OutOfMemoryError就会出现,我认为这是正确的,因为我已经看到了OutOfMemoryError彼尔姆根空间.

Till today, I knew permgen space has some limit and when this limit is exhausted, OutOfMemoryError comes, and I think this is correct because I have seen OutOfMemoryError Permgen space.

但是在Java虚拟机内部引号

方法区域的大小无需固定.随着Java应用程序的运行,虚拟机可以扩展和收缩方法区域以适应应用程序的需求.

The size of the method area need not be fixed. As the Java application runs, the virtual machine can expand and contract the method area to fit the application's needs.

那么,当JVM可以扩展时,为什么会出现错误?扩展有限制吗?

So, when JVM can expand, why the error comes? Is there any limit for expansion?

推荐答案

Method Area是较大的PermGen或非堆"存储区的一部分. PermSize设置固定了PermGen可以使用的最大内存.由于Method AreaPermGen子部分,因此只要PermGen的总大小保持在指定的限制内,它就可以根据需要进行扩展.

The Method Area is part of larger PermGen or Non-Heap memory area. The PermSize setting fixes the maximum memory the the PermGen can use. Since Method Area is a subpart of PermGen, it can expand as needed as long as the overall PermGen size remains withing specified limit.

PermGen空间需求超过指定限制的那一刻(例如由于扩展了Method Area),将抛出OutOfMemoryError.

The moment, PermGen space requirement goes beyond the specified limit, (say because of expanding Method Area), OutOfMemoryError is thrown.

这篇关于为什么会发生Permgen OutOfMemeoryError?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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