2

If I try to run Java with more than 1397mb using -Xmx1397m command line parameter it fails to initialize. Why is this?

I.E.:

  • "java path\java.exe" -Xmx1397m -> works

  • java path\java.exe" -Xmx1398m ->crashes

The machine almost 100GB of unused ram and I'm running 32bit java

r0-
  • 2,388
  • 1
  • 24
  • 29
kman99
  • 7,315
  • 4
  • 24
  • 20
  • 1
    See [here](http://stackoverflow.com/questions/987219/max-amount-of-memory-per-java-process-in-windows/987576#987576). You probably should consider moving to 64-bit JVM. – Andrew Logvinov Mar 20 '13 at 14:39

1 Answers1

1

It is a known issue with 32bit java on Windows that you can't get the expected 3 GB of heap due to address space fragmentation issues. The HotSpot JVM needs a contiguous address block for its heap, and some shared DLLs that are permanently mapped into user space are fragmenting the space.

Marko Topolnik
  • 195,646
  • 29
  • 319
  • 436