• <legend id='L2HSB'><style id='L2HSB'><dir id='L2HSB'><q id='L2HSB'></q></dir></style></legend>
    <tfoot id='L2HSB'></tfoot>

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

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

      2. <small id='L2HSB'></small><noframes id='L2HSB'>

        尝试增加 jvm 内存时,您可以将 Xmx 设置为最大数量吗?

        Is there a maximum number you can set Xmx to when trying to increase jvm memory?(尝试增加 jvm 内存时,您可以将 Xmx 设置为最大数量吗?)
      3. <i id='0Sbpj'><tr id='0Sbpj'><dt id='0Sbpj'><q id='0Sbpj'><span id='0Sbpj'><b id='0Sbpj'><form id='0Sbpj'><ins id='0Sbpj'></ins><ul id='0Sbpj'></ul><sub id='0Sbpj'></sub></form><legend id='0Sbpj'></legend><bdo id='0Sbpj'><pre id='0Sbpj'><center id='0Sbpj'></center></pre></bdo></b><th id='0Sbpj'></th></span></q></dt></tr></i><div id='0Sbpj'><tfoot id='0Sbpj'></tfoot><dl id='0Sbpj'><fieldset id='0Sbpj'></fieldset></dl></div>

            <tbody id='0Sbpj'></tbody>

          1. <tfoot id='0Sbpj'></tfoot>
              <bdo id='0Sbpj'></bdo><ul id='0Sbpj'></ul>

                • <legend id='0Sbpj'><style id='0Sbpj'><dir id='0Sbpj'><q id='0Sbpj'></q></dir></style></legend>

                  <small id='0Sbpj'></small><noframes id='0Sbpj'>

                  本文介绍了尝试增加 jvm 内存时,您可以将 Xmx 设置为最大数量吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有最大值吗?您可以将 Xmx 设置为的大小?我将它设置为 1024m 并且 Eclipse 可以正常打开.当我将其设置为 1024 以上时,eclipse 无法打开,并且出现错误jvm 已终止.退出代码=-1"...

                  Is there a max. size you can set Xmx to? I set it to 1024m and eclipse opens ok. When I set it above 1024, eclipse doesn't open and I get the error "jvm terminated. Exit code=-1"...

                  我这样做是因为我不断收到java.lang.OutOfMemoryError: Java heap space".我正在读取一个 35.5Mb 的 .txt 文件,当它只是使用while((line = reader.readLine()) != null)"循环读取文件时会发生此错误.我原以为1024mb就足够了.谁能帮帮我?

                  I was doing this because I keep getting an "java.lang.OutOfMemoryError: Java heap space". I am reading in a 35.5Mb .txt file and this error occurs when it's just reading in the file using the "while((line = reader.readLine()) != null)" loop. I would have thought that 1024mb would have been enough. Can anyone help me?

                  推荐答案

                  是的,有一个最大值,但它取决于系统.试试看,加倍直到达到极限,然后向下搜索.至少在 Linux 上使用 Sun JRE 1.6 时,您会得到有趣的错误消息(如果不总是提供信息)(peregrino 是运行 32 位 ubuntu 且具有 2G RAM 且无交换的上网本):

                  Yes, there is a maximum, but it's system dependent. Try it and see, doubling until you hit a limit then searching down. At least with Sun JRE 1.6 on linux you get interesting if not always informative error messages (peregrino is netbook running 32 bit ubuntu with 2G RAM and no swap):

                  peregrino:$ java -Xmx4096M -cp bin WheelPrimes 
                  Invalid maximum heap size: -Xmx4096M
                  The specified size exceeds the maximum representable size.
                  Could not create the Java virtual machine.
                  
                  peregrino:$ java -Xmx4095M -cp bin WheelPrimes 
                  Error occurred during initialization of VM
                  Incompatible minimum and maximum heap sizes specified
                  
                  peregrino:$ java -Xmx4092M -cp bin WheelPrimes 
                  Error occurred during initialization of VM
                  The size of the object heap + VM data exceeds the maximum representable size
                  
                  peregrino:$ java -Xmx4000M -cp bin WheelPrimes 
                  Error occurred during initialization of VM
                  Could not reserve enough space for object heap
                  Could not create the Java virtual machine.
                  
                  (experiment reducing from 4000M until)
                  
                  peregrino:$ java -Xmx2686M -cp bin WheelPrimes 
                  (normal execution)
                  

                  大多数都是不言自明的,除了 -Xmx4095M 这很奇怪(可能是有符号/无符号比较?),它声称在没有交换的 2GB 机器上保留 2686M.但它确实暗示了 32 位 VM 的最大大小是 4G 而不是 2G,如果操作系统允许你处理那么多的话.

                  Most are self explanatory, except -Xmx4095M which is rather odd (maybe a signed/unsigned comparison?), and that it claims to reserve 2686M on a 2GB machine with no swap. But it does hint that the maximum size is 4G not 2G for a 32 bit VM, if the OS allows you to address that much.

                  这篇关于尝试增加 jvm 内存时,您可以将 Xmx 设置为最大数量吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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?(为什么是锯齿形图形?)

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

                  1. <tfoot id='C1wwc'></tfoot>
                        <tbody id='C1wwc'></tbody>
                      • <legend id='C1wwc'><style id='C1wwc'><dir id='C1wwc'><q id='C1wwc'></q></dir></style></legend>

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