- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我读了几篇文章,我理解了以下内容(如果我错了,请纠正我和/或编辑问题):
java堆是这样分割的:
Young Generation:创建的对象放在这里,这部分被频繁且廉价地垃圾收集
Old Generation:在 Young generation 的垃圾收集中幸存下来的对象放在这里,这个区域的垃圾收集频率较低,并且使用对 CPU 要求更高的进程/算法(我相信它称为标记清除)
编辑:正如另一位用户所述,PermGen 不是名为 heap
的区域的一部分
那么,知道这一点……为什么我的 PermGen 空间会在应用程序负载很重时增长?对于我之前所说的,尽管有应用程序负载,这个空间不应该逐渐填充,但正如我在开始时所说的那样,我可能对某些假设是错误的。
事实上,如果 PermGen 空间在增长,是否有垃圾收集或重置的方法?
最佳答案
实际上,在 Sun 的 JVM 中永久代(PermGen)是完全独立于堆的。你确定你不是在看Tenured Generation吗?如果你的 Permanent Generation 一直在增长,那确实是值得怀疑的。
如果您的 perm gen 不断增长,那么这是一个很难深入的领域。通常它应该在第一次加载新类时增长(并且可能某些反射的使用也可能导致这种情况)。 Interned 字符串也存储在 perm gen 中。
如果您碰巧在 Solaris 上,您可以使用 jmap -permstat 来转储 perm gen 统计信息,但该选项在 Windows(以及其他可能的平台)上似乎不可用。这是 the documentation on jmap for Java 6
来自Sun的guide on JConsole (这将让您查看这些池的大小):
For the HotSpot Java VM, the memory pools for serial garbage collection are the following.
- Eden Space (heap): The pool from which memory is initially allocated for most objects.
- Survivor Space (heap): The pool containing objects that have survived the garbage collection of the Eden space.
- Tenured Generation (heap): The pool containing objects that have existed for some time in the survivor space.
- Permanent Generation (non-heap): The pool containing all the reflective data of the virtual machine itself, such as class and method objects. With Java VMs that use class data sharing, this generation is divided into read-only and read-write areas.
- Code Cache (non-heap): The HotSpot Java VM also includes a code cache, containing memory that is used for compilation and storage of native code.
关于java - 为什么 PermGen 空间在增长?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2051734/
增长,则让
当我输入内容时,如何移动 p 段落下方的所有元素,即 contenteditable。 这是我的代码: body, html { margin: 0; padding: 0; backgr
我要解决的问题: 我有一个包含 div 的外部 div。 content 内部和外部 div 之间的边距应始终相同。 当内部 div 增长/收缩时,外部 div
这document Ulrich Drepper 称为“图书馆设计、实现和维护的良好实践”(第 5 页底部): [...] the type definition should always crea
有什么方法可以获取 QPainterPath 并将其展开,就像 Photoshop 中的“选择”>“增长...”(或“展开...”)命令一样? 我想获取从 QGraphicsItem::shape 返
假设,为了问题的目的,我们有一个内存池,最初分配了 n 个 block 。但是,当达到容量时,池想要增长并变成原来大小的两倍 (2n)。 现在可以使用 C 中的 realloc 完成此调整大小操作,但
假设,为了问题的目的,我们有一个内存池,最初分配了 n 个 block 。但是,当达到容量时,池想要增长并变成原来大小的两倍 (2n)。 现在可以使用 C 中的 realloc 完成此调整大小操作,但
我正在研究 boost 库的共享内存部分,为更大的项目做准备。我需要一个共享内存段,在初始化时我不一定知道它的大小,所以我的计划是增加这个段。 我的初始实现有一个存储在共享内存中的 boost::in
这个问题在这里已经有了答案: How to disable equal height columns in Flexbox? (4 个答案) What are the differences bet
我有一个包含子表的表。我不希望子表影响表格的宽度——在溢出的情况下,我希望两者独立滚动。此外,由于子表是基于切换显示的,所以我不希望主表行根据子表是否可见而跳转 Here's代码笔。 我想我可以用 t
我有一个带栏的页面设计,它可以有一个、两个或三个栏。这些列的大小应相同。 为此我使用了 flexbox,它很好,允许我添加/删除我的列并让浏览器处理列宽的大小调整。 现在,当列中的文本大于列的宽度时,
要求: 我需要根据数据增长一个任意大的数组。 我可以猜测大小(大约 100-200),但不能保证数组每次都能适合 一旦它增长到最终大小,我需要对其执行数值计算,因此我更愿意最终得到一个二维 numpy
我有一个 3x256 规则的规则集。每个规则映射到一个 3x3 的值网格,这些值本身就是规则。 规则示例: 0 -> [[0,0,0],[0,1,0],[0,0,0]] 1 -> [[1,1,1],
我有 3 个 div,如果我给前两个 div flex: 0.5,如果我给了 flex-wrap: wrap,最后一个 div 应该移动到下一行>。如果我错了,请指正。 以下是我的 html/css:
在文档和 Bootstrap v4 问题中 (here) ,我看不到任何支持 flex-grow 的计划,例如语法如下: I use all the space lef
要求: 我需要从数据中增加一个任意大的数组。 我可以猜测大小(大约 100-200),但不能保证每次都适合数组 一旦它增长到最终大小,我需要对其执行数值计算,因此我希望最终得到一个二维 numpy 数
我知道(并在互联网上阅读-包括此资源)。增加内存的逻辑是:如果len数组小于1024-golang将array乘以2,否则将len乘以1.25(并且我们在源代码中看到了这个问题https://gith
当输入长文本时,WPF TextBox 控件会增长。 这个问题已经在 Stackoverflow 中提出了 我也引用了一些答案,但我仍然没有找到有效的正确答案。 Here提到了同样的问题,但没有针对此
我在使用 Vaadin HorizonalLayout 时遇到问题 - 我希望左侧组件填充大部分水平空间,如 Fiddle 所示 但是,当我运行 Vaadin 应用程序时,这两个组件会平分屏幕。
关于这个fiddle , 当我点击 a href在这种情况下这是一个图像,我希望图像从 div 开始增长/过渡以通过过渡/缩放填充整个页面它被放置在其中。如果这不可能,我想用 div 的背景颜色填充页
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 6 年前。 Improve this q
我是一名优秀的程序员,十分优秀!