我已经在jboss和linux 2.6.32上部署了我的java应用程序。 该机器有8 GB的内存,但是当我使用
在openjdk上运行应用程序时JAVA_OPTS =“$ JAVA_OPTS -server -Xms2048m -Xmx2048m -XX:MaxPermSize = 700m -XX:NewRatio = 3 -XX:+ DisableExplicitGC -XX:+ UseParallelOldGC -XX:ParallelGCThreads = 4 -Dsun.rmi.dgc.client.gcInterval = 3600000 -Dsun.rmi.dgc.server.gcInterval = 3600000 -Dofbiz.home = adasdfasdf”。
工作正常。 但是,当我尝试在jdk 1.6上运行相同时,它给出了内存错误,如下所示:
There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 444 bytes for vframeArray::allocate
# 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.inline.hpp:44), pid=11749, tid=707259248
#
# JRE version: 6.0_32-b05
# Java VM: Java HotSpot(TM) Server VM (20.7-b02 mixed mode linux-x86 )
--------------- T H R E A D ---------------
Current thread (0x2a5b5000): JavaThread "main" [_thread_in_Java, id=11768, stack(0x2a22e000,0x2a27f000)]
Stack: [0x2a22e000,0x2a27f000], sp=0x2a27cd50, free space=315k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x7257e0]
如何使用jdk 1.6运行应用程序?