0
回答
java虚拟机内存如何设置,非eclipse,tomcat
终于搞明白,存储TCO原来是这样算的>>>   

在编译openjdk中遇到的问题

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 2147483664 bytes for Chunk::new
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (allocation.cpp:323), pid=29957, tid=140531611686656
#
# JRE version: OpenJDK Runtime Environment (7.0) (build 1.7.0-internal-root_2017_03_30_20_45-b00)
# Java VM: OpenJDK 64-Bit Server VM (24.0-b56 mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again


#Java运行时环境的内存不足以继续。
#本地内存分配(malloc)无法为Chunk :: new分配2147483664个字节
#可能的原因:
#系统超出物理RAM或交换空间
#在32位模式下,命中进程大小限制
# 可能的解决方案:
#减少系统的内存负载
#增加物理内存或交换空间
#检查交换后备存储是否已满
#在64位操作系统上使用64位Java
#减少Java堆大小(-Xmx / -Xms)
#减少Java线程的数量
#减少Java线程堆栈大小(-Xss)
#用-XX设置更大的代码缓存:ReservedCodeCacheSize =
#此输出文件可能被截断或不完整。

#内存不足错误(allocation.cpp:323),pid = 29957,tid = 140531611686656

#JRE版本:OpenJDK Runtime Environment(7.0)(build 1.7.0-internal-root_2017_03_30_20_45-b00)
#Java VM:OpenJDK 64位服务器虚拟机(24.0-b56混合模式linux-amd64压缩oops)
#写入核心转储失败。核心转储已被禁用。要启用核心转储,请在重新启动Java之前尝试“ulimit -c unlimited”

 

如何设置这几个参数

用java -Xmx128m -Xms64m -Xmn32m -Xss16m 不好使,打印意思是命令输入有误。

 make 2>&1|tee $ALT_OUTPUTDIR/build.log

 

<无标签>
举报
刘hh
发帖于7个月前 0回/94阅
顶部