2

私のOSのバージョンはWindows 7 64ビットで、JDKは32ビット版です。JBoss Wrapper Application を正常に起動しましたが、しばらく実行した後、JVM が失敗して再起動しました。

JVM ダンプ ログのメッセージは次のとおりです。

#
# 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
#

コンピューターに 3 つのラッパー アプリケーションをデプロイします。それぞれが最大 JVM ヒープ サイズ 700Mb に設定されています。

この問題を見直すのを手伝ってください。ありがとう。私の質問は次のとおりです。

  1. 現在の JVM 割り当てサイズを知るにはどうすればよいですか?
  2. この問題の原因は何ですか?
  3. どうすれば修正できますか?誰かが私に 64 ビット JDK の使用を勧めました。それは必要ですか?
4

2 に答える 2

2

を使用する場合32-bit JDK、設定できる最大ヒープ サイズは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 a64 ビットoperating system running on a server that has a64 ビット`CPU のままです。

  1. ダウンロードしたJDK 64 bit version

  2. JAVA_OPTS を

     JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m 
    

このリンクを参照してください。

また、これはメモリに関する良い記事です。

于 2012-10-08T07:02:21.613 に答える
1

32ビットJVMは、最大2GBのヒープに制限されています(-Xmx)。一部のオペレーティングシステムでは、それよりはるかに少ないです。

64ビットJVMにはこの制限はありません。

Windowsでは、タスクマネージャ->プロセスを使用してJVMのメモリ消費量を追跡できます 。

于 2012-10-08T06:54:35.827 に答える