I have a rather memory hungry java application.
On my 32 bit systems with Windows XP Professional the application will just run fine if I give it -Xmx1280m
. Everything below will end up in an java.lang.OutOfMemoryError: Java heap space
exception.
If I run the same application on a 64 bit Windows XP Professional (everything else exactly the same) it requires -Xms1400m
to prevent the OutOfMemory condition.
To my understanding, if I have a C program and I compile it for 32 bit and for 64 bit the 64 bit version will need more memory because pointers are wider and so on. In my java example however the virtual machine (Sun) is the same and the bytecode is the same.
Why does it need more memory on the 64 bit machine?