64-bits JVMs can allocate more memory than the 32-bits ones.
In 32-bit JVM maximum, addressable memory space is only two to the power of thirty two 2^32 (i.e.~4gb). It means the maximum memory size of your Java process can’t be more than 4GB. Due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice, the limit is much lower. T
Another questions is, does same Java program can run on both 32-bit and 64-bit JVM? Java is platform independent and same Java program will run absolutely fine in both 32-bit and 64-bit JVM. The real difference comes in addressable memory or heap memory. In 32-bit JVM, the theoretical limit of maximum heap size is around 4G but practically you get way less than that e.g. around 1.5 GB in Windows and close to 3 GB in Solaris
No comments:
Post a Comment