title: How to deal with JVM OutOfMemoryError on Linux?
body: <p>Redhat Enterprise Linux 5.4 32-bit + Sun HotSpot JVM 6u5 32-bit + JVM settings<code>-Xms1536m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=512m</code>.</p>
  
  <p>The JVM crashes with the following errors:</p>
  
  <blockquote>
    <p>java.lang.OutOfMemoryError: requested 828752 bytes for Chunk::new. Out of swap space?
    Internal Error (allocation.cpp:218), pid=21557, tid=329534352
    Error: Chunk::new</p>
    
    <p>java.lang.OutOfMemoryError: requested 383504 bytes for GrET in /BUILD_AREA/jdk6_05/hotspot/src/share/vm/utilities/growableArray.cpp. Out of swap space?
    Internal Error (allocation.inline.hpp:42), pid=16927, tid=334281616
    Error: GrET in /BUILD_AREA/jdk6_05/hotspot/src/share/vm/utilities/growableArray.cpp</p>
    
    <p>java.lang.OutOfMemoryError: requested 256000 bytes for GrET in /BUILD_AREA/jdk6_05/hotspot/src/share/vm/utilities/growableArray.cpp. Out of swap space?
    Internal Error (allocation.inline.hpp:42), pid=16863, tid=334216080
    Error: GrET in /BUILD_AREA/jdk6_05/hotspot/src/share/vm/utilities/growableArray.cpp
    ..........</p>
  </blockquote>
  
  <p>It may be the JVM itself C/C++ core memory leak, the C/C++ memory usage reaching the JVM critical value, or the platform swap space is insufficient.</p>
  
  <p>How to deal with JVM itself C/C++ core memory leak?<br>
  Valgrind v3.7 cannot work with the hotspot JVM 6u5.</p>