<bdo id='ZrHQs'></bdo><ul id='ZrHQs'></ul>

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

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

      1. 启动JVM时-Xms和-Xmx参数是什么?

        时间:2023-08-24

      2. <tfoot id='MxXcG'></tfoot>

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

                • <bdo id='MxXcG'></bdo><ul id='MxXcG'></ul>

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

                  <legend id='MxXcG'><style id='MxXcG'><dir id='MxXcG'><q id='MxXcG'></q></dir></style></legend>
                  本文介绍了启动JVM时-Xms和-Xmx参数是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  请解释XmsXmx 参数在JVM 中的使用.它们的默认值是什么?

                  Please explain the use of the Xms and Xmx parameters in JVMs. What are the default values for them?

                  推荐答案

                  标志 Xmx 指定 Java 虚拟机 (JVM) 的最大内存分配池,而 Xms 指定初始内存分配池.

                  The flag Xmx specifies the maximum memory allocation pool for a Java Virtual Machine (JVM), while Xms specifies the initial memory allocation pool.

                  这意味着您的 JVM 将以 Xms 内存量启动,并且能够使用最大 Xmx 内存量.例如,像下面这样启动 JVM 将使用 256 MB 内存启动它,并允许进程使用最多 2048 MB 内存:

                  This means that your JVM will be started with Xms amount of memory and will be able to use a maximum of Xmx amount of memory. For example, starting a JVM like below will start it with 256MB of memory and will allow the process to use up to 2048MB of memory:

                  java -Xms256m -Xmx2048m
                  

                  内存标志也可以指定为不同的大小,如千字节、兆字节等.

                  The memory flag can also be specified in different sizes, such as kilobytes, megabytes, and so on.

                  -Xmx1024k
                  -Xmx512m
                  -Xmx8g
                  

                  Xms 标志没有默认值,Xmx 通常有 256 MB 的默认值.这些标志的常见用途是当您遇到 java.lang.OutOfMemoryError.

                  The Xms flag has no default value, and Xmx typically has a default value of 256MB. A common use for these flags is when you encounter a java.lang.OutOfMemoryError.

                  使用这些设置时,请记住,这些设置是针对 JVM 的 的,并且 JVM 可以并且将使用更多的内存,而不仅仅是分配给堆的大小.来自 Oracle 的文档:

                  When using these settings, keep in mind that these settings are for the JVM's heap, and that the JVM can and will use more memory than just the size allocated to the heap. From Oracle's documentation:

                  请注意,JVM 使用的内存不仅仅是堆.例如,Java 方法、线程堆栈和本机句柄被分配在与堆分开的内存中,以及 JVM 内部数据结构中.

                  Note that the JVM uses more memory than just the heap. For example Java methods, thread stacks and native handles are allocated in memory separate from the heap, as well as JVM internal data structures.

                  这篇关于启动JVM时-Xms和-Xmx参数是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何修复 java.lang.UnsupportedClassVersionError:不支持的 major.minor 下一篇:如何增加 JVM 内存?

                  相关文章

                  <legend id='cEFPM'><style id='cEFPM'><dir id='cEFPM'><q id='cEFPM'></q></dir></style></legend>
                  • <bdo id='cEFPM'></bdo><ul id='cEFPM'></ul>

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

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