Reputation: 11791
My OS version is Windows 7 64 bit and the JDK is 32 bit version. I started my JBoss Wrapper Application successfully, but after it ran for a while the JVM failed and restarted.
The message in the JVM dump log is:
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 543672 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:328), pid=5480, tid=4740
#
# JRE version: 7.0_05-b05
# Java VM: Java HotSpot(TM) Server VM (23.1-b03 mixed mode windows-x86 )
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
I deploy 3 wrapper applications on my computer. Each of them set to a maximum JVM heap size of 700Mb.
Please help me review this problem. thanks. My questions are:
Upvotes: 2
Views: 1520
Reputation: 4259
If you use 32-bit JDK
, the maximum heap size we can set and still have the JVM start up is about 1.2 GB.For larger heaps, we need to run a 64-bit JDK. To run 64-bit JDK, you’d also need a
64-bitoperating system running on a server that has a
64-bit` CPU.
Downloaded the JDK 64 bit version
Set the JAVA_OPTS to
JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m
and refer this link.
Also this is good article about memory.
Upvotes: 2
Reputation: 2536
32-bit JVM are limited to a 2GB heap maximum (-Xmx
). In some operating systems, much less than that.
A 64-bit JVM will not have this limitation.
In Windows, you can follow your JVM's memory consumption with Task Manager->Processes.
Upvotes: 1