• <small id='j5cdl'></small><noframes id='j5cdl'>

      1. <i id='j5cdl'><tr id='j5cdl'><dt id='j5cdl'><q id='j5cdl'><span id='j5cdl'><b id='j5cdl'><form id='j5cdl'><ins id='j5cdl'></ins><ul id='j5cdl'></ul><sub id='j5cdl'></sub></form><legend id='j5cdl'></legend><bdo id='j5cdl'><pre id='j5cdl'><center id='j5cdl'></center></pre></bdo></b><th id='j5cdl'></th></span></q></dt></tr></i><div id='j5cdl'><tfoot id='j5cdl'></tfoot><dl id='j5cdl'><fieldset id='j5cdl'></fieldset></dl></div>
        <legend id='j5cdl'><style id='j5cdl'><dir id='j5cdl'><q id='j5cdl'></q></dir></style></legend>
        <tfoot id='j5cdl'></tfoot>
          <bdo id='j5cdl'></bdo><ul id='j5cdl'></ul>

        哪些参数代表 JVM 内存选项中的内容?

        Which arguments stand for what in JVM memory options?(哪些参数代表 JVM 内存选项中的内容?)

          <tbody id='8E6Lc'></tbody>
        <tfoot id='8E6Lc'></tfoot>
        <legend id='8E6Lc'><style id='8E6Lc'><dir id='8E6Lc'><q id='8E6Lc'></q></dir></style></legend>

        1. <small id='8E6Lc'></small><noframes id='8E6Lc'>

          <i id='8E6Lc'><tr id='8E6Lc'><dt id='8E6Lc'><q id='8E6Lc'><span id='8E6Lc'><b id='8E6Lc'><form id='8E6Lc'><ins id='8E6Lc'></ins><ul id='8E6Lc'></ul><sub id='8E6Lc'></sub></form><legend id='8E6Lc'></legend><bdo id='8E6Lc'><pre id='8E6Lc'><center id='8E6Lc'></center></pre></bdo></b><th id='8E6Lc'></th></span></q></dt></tr></i><div id='8E6Lc'><tfoot id='8E6Lc'></tfoot><dl id='8E6Lc'><fieldset id='8E6Lc'></fieldset></dl></div>
            <bdo id='8E6Lc'></bdo><ul id='8E6Lc'></ul>

                  本文介绍了哪些参数代表 JVM 内存选项中的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有很多 JVM 参数会影响 JVM 的内存使用,例如 -Xms、-Xmx、-Xns、-XX:MaxPermSize...

                  There a lot of JVM arguments that affect the JVM's memory usage like -Xms, -Xmx, -Xns, -XX:MaxPermSize...

                  • 他们是做什么的?
                  • 还有吗?
                  • 遇到什么错误(如OutOfMemoryErrorStackOverflowError...)时我必须增加哪一项?
                  • What do they do?
                  • Are there any more?
                  • Which one do I have to increase when I get what error (e.g. OutOfMemoryError, StackOverflowError...)?

                  我找不到适合他们的备忘单 - 让我们在这里创建一个.

                  I cannot find a good cheat sheet for them - let's create one here.

                  推荐答案

                  -Xms: 此选项设置初始和最小 Java 堆大小.

                  -Xms: this option sets the initial and minimum Java heap size.

                  -Xmx:此选项设置最大 Java 堆大小.Java 堆(堆")是内存的一部分,其中内存块被分配给对象并在垃圾回收期间被释放.

                  -Xmx: This option sets the maximum Java heap size. The Java heap (the "heap") is the part of the memory where blocks of memory are allocated to objects and freed during garbage collection.

                  -XX:PermSize: -XX:MaxPermSize: 用于设置永久生成的大小.永久空间是存储类、方法、内部化字符串和 VM 使用的类似对象的位置,并且永远不会被释放(因此得名).

                  -XX:PermSize: -XX:MaxPermSize: are used to set size for Permanent Generation. The permanent space is where are stored the class, methods, internalized strings, and similar objects used by the VM and never deallocated (hence the name).

                  -Xss: 设置线程堆栈大小.线程堆栈是为每个 Java 线程分配的内存区域,供其内部使用.这是线程存储其本地执行状态的地方.

                  -Xss: sets the thread stack size. Thread stacks are memory areas allocated for each Java thread for their internal use. This is where the thread stores its local execution state.

                  -Xns: 设置托儿所大小.JRockit JVM 在使用分代垃圾收集模型时使用托儿所,即当动态垃圾收集器确定应该使用分代垃圾收集模型或静态分代并发垃圾收集器(-Xgc:gencon)已选择.您还可以在运行动态垃圾收集器 (-XgcPrio) 时使用 -Xns 设置静态托儿所大小.

                  -Xns: sets the nursery size. the JRockit JVM uses a nursery when the generational garbage collection model is used, that is, when the dynamic garbage collector has determined that the generational garbage collection model should be used or when the static generational concurrent garbage collector ( -Xgc : gencon) has been selected. You can also use -Xns to set a static nursery size when running a dynamic garbage collector (-XgcPrio).

                  • 如果您收到 java.lang.OutOfMemoryError: Java heap space,则更改 -Xmx 的值>-Xms.

                  如果您遇到 java.lang.OutOfMemoryError: PermGen space,请尝试增加 - XX:MaxPermSize 值.

                  如果您遇到 java.lang.StackOverflowError,请尝试增加 -Xss 值.增加堆栈大小可能会有所帮助,但您也应该查看您的代码.

                  if you are getting java.lang.StackOverflowError than try increasing the -Xss value. It may be helpful by increasing the stack size but you should have a look at your code as well.

                  这篇关于哪些参数代表 JVM 内存选项中的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Bytecode features not available in the Java language(Java 语言中不可用的字节码功能)
                  ClassCastException because of classloaders?(ClassCastException 因为类加载器?)
                  How can I add a Javaagent to a JVM without stopping the JVM?(如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?)
                  Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )(无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件))
                  Encourage the JVM to GC rather than grow the heap?(鼓励 JVM 进行 GC 而不是增加堆?)
                  Why a sawtooth shaped graph?(为什么是锯齿形图形?)

                    <bdo id='ucGHo'></bdo><ul id='ucGHo'></ul>
                  • <tfoot id='ucGHo'></tfoot>
                    <legend id='ucGHo'><style id='ucGHo'><dir id='ucGHo'><q id='ucGHo'></q></dir></style></legend>
                    <i id='ucGHo'><tr id='ucGHo'><dt id='ucGHo'><q id='ucGHo'><span id='ucGHo'><b id='ucGHo'><form id='ucGHo'><ins id='ucGHo'></ins><ul id='ucGHo'></ul><sub id='ucGHo'></sub></form><legend id='ucGHo'></legend><bdo id='ucGHo'><pre id='ucGHo'><center id='ucGHo'></center></pre></bdo></b><th id='ucGHo'></th></span></q></dt></tr></i><div id='ucGHo'><tfoot id='ucGHo'></tfoot><dl id='ucGHo'><fieldset id='ucGHo'></fieldset></dl></div>

                        <tbody id='ucGHo'></tbody>

                            <small id='ucGHo'></small><noframes id='ucGHo'>