我设了"-Xmx256m" ,如果程序运行时虚拟机占用内存的大小已经涨到了256m后,程序会出现什么样的情况,会崩了吗.

解决方案 »

  1.   

    -Xmxn
        Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples:       -Xmx83886080
           -Xmx81920k
           -Xmx80m应该为抛出runoutotmemoryexception吧,没有验证过。
      

  2.   

    out of memory异常。崩不崩不一定。但涉及到内存的操作都失败,跟崩也没什么区别。