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

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

    <legend id='MASvk'><style id='MASvk'><dir id='MASvk'><q id='MASvk'></q></dir></style></legend>
    <tfoot id='MASvk'></tfoot>

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

      无法为对象堆保留足够的空间来启动 JVM

      Could not reserve enough space for object heap to start JVM(无法为对象堆保留足够的空间来启动 JVM)

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

        • <legend id='AZL7N'><style id='AZL7N'><dir id='AZL7N'><q id='AZL7N'></q></dir></style></legend>

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

                  <tbody id='AZL7N'></tbody>
                本文介绍了无法为对象堆保留足够的空间来启动 JVM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                刚刚遇到奇怪的问题.当我输入时

                Just faced with strange issue. When i type

                java -version
                

                我明白了

                Error occurred during initialization of VM
                Could not reserve enough space for object heap
                Could not create the Java virtual machine.
                

                .

                java -Xms64m -Xmx64m -version
                

                这个命令很好用

                java version "1.6.0_24"
                Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
                Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode)
                

                如果我将 xms、xmx 更改为 128m,我会再次出错.

                If i change xms, xmx to 128m, i get error again.

                使用 top 命令和 free -m 我可以看到,我获得了超过 192 mb 的空闲空间,那么为什么我仍然会收到此错误?

                Using top command and free -m i can see, that i got over 192 mb free, so why i still get this error ?

                Mem:    262144k total,    64760k used,   197384k free,        0k buffers
                Swap:        0k total,        0k used,        0k free,        0k cached
                

                谢谢

                推荐答案

                您尝试运行它的机器似乎只有 256 MB 内存.

                It looks like the machine you're trying to run this on has only 256 MB memory.

                也许 JVM 尝试分配一个大的、连续的 64 MB 内存块.您可用的 192 MB 可能会被分割成更小的部分,因此没有 64 MB 的连续块可供分配.

                Maybe the JVM tries to allocate a large, contiguous block of 64 MB memory. The 192 MB that you have free might be fragmented into smaller pieces, so that there is no contiguous block of 64 MB free to allocate.

                尝试使用较小的堆大小启动 Java 程序,例如:

                Try starting your Java program with a smaller heap size, for example:

                java -Xms16m ...
                

                这篇关于无法为对象堆保留足够的空间来启动 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?(为什么是锯齿形图形?)

                  <tbody id='ly1f9'></tbody>
                  • <small id='ly1f9'></small><noframes id='ly1f9'>

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

                        <tfoot id='ly1f9'></tfoot>

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