1. <legend id='j3EvU'><style id='j3EvU'><dir id='j3EvU'><q id='j3EvU'></q></dir></style></legend><tfoot id='j3EvU'></tfoot>
        <bdo id='j3EvU'></bdo><ul id='j3EvU'></ul>

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

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

        以编程方式设置最大 Java 堆大小

        时间:2023-08-23
          <bdo id='Tc5he'></bdo><ul id='Tc5he'></ul>

            <tbody id='Tc5he'></tbody>

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

            <legend id='Tc5he'><style id='Tc5he'><dir id='Tc5he'><q id='Tc5he'></q></dir></style></legend>
          • <tfoot id='Tc5he'></tfoot>
                  <i id='Tc5he'><tr id='Tc5he'><dt id='Tc5he'><q id='Tc5he'><span id='Tc5he'><b id='Tc5he'><form id='Tc5he'><ins id='Tc5he'></ins><ul id='Tc5he'></ul><sub id='Tc5he'></sub></form><legend id='Tc5he'></legend><bdo id='Tc5he'><pre id='Tc5he'><center id='Tc5he'></center></pre></bdo></b><th id='Tc5he'></th></span></q></dt></tr></i><div id='Tc5he'><tfoot id='Tc5he'></tfoot><dl id='Tc5he'><fieldset id='Tc5he'></fieldset></dl></div>
                  本文介绍了以编程方式设置最大 Java 堆大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有没有办法以编程方式设置最大 java 堆大小而不是作为 vm 参数?

                  Is there a way to set the max java heap size programmatically instead of as a vm argument?

                  类似:

                  System.getProperties().put("<heap variable>", "1000m");
                  

                  推荐答案

                  不适用于任何 Hotspot JVM.JVM 堆参数只能在命令行中指定,然后在 JVM 的生命周期内固定.

                  Not with any Hotspot JVM. The JVM heap parameters can only be specified on the command line, and are then fixed for the lifetime of the JVM.

                  使用 Hotspot Java 实现,更改"应用程序的堆大小的唯一方法是在具有不同命令行参数的新 JVM 中重新启动它.

                  With Hotspot Java implementations, the only way to "change" the heap size of an application is to relaunch it in a new JVM with different command line parameters.

                  (我隐约记得其他一些供应商的 JVM确实允许在运行的 JVM 中更改一些堆参数.也许有人可以澄清一下.)

                  (I vaguely recall that JVMs from some other vendors do allow some heap parameters to be changed in a running JVM. Perhaps someone can clarify.)

                  这篇关于以编程方式设置最大 Java 堆大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:JVM_FindSignal 函数不断分配本机内存 下一篇:分析 volatile 上下文中 JIT 生成的 x86 输出

                  相关文章

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

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

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

                    <legend id='hkE0l'><style id='hkE0l'><dir id='hkE0l'><q id='hkE0l'></q></dir></style></legend>