2 Replies Latest reply: Feb 7, 2013 5:56 AM by 800381 RSS

    Latest  32-bit Java 7 compiled with /LARGEADDRESSAWARE?

    Jim Connors
      While searching around, I didn't have a whole lot of success getting a clear answer, thus I appeal to this forum...

      A customer of ours wants to continue using the 32-bit Java 7 VM on 64-bit Windows 2008, but would like to use as large a heap as possible. Has the Windows 32-bit Java 7 VM been compiled with /LARGEADDRESSAWARE? Is there any documentation about this?

      Thanks,
      -- Jim C
        • 1. Re: Latest  32-bit Java 7 compiled with /LARGEADDRESSAWARE?
          Jim Connors
          The 32-bit JVM for Windows is not compiled with LARGEADDRESSAWARE, and based upon recent space optimizations with Java 7, is likely not to be anytime soon. In the past, some avoided the 64-bit JVM if they didn't need the extra heap space because it incurred significant memory overhead. That is not necessarily the case now. In fact Oracle recommends using the 64-bit JVM even if your heap requirements don't exceed 4GB. Why?

          1. The 64-bit JVM will automatically use 32-bit references on the heap when its size is below 4GB. The command-line switch -XX:+|-UseCompressedOops, available in Java 7, enables/disables this mode and by default is on. Not all internal pointers will be 32-bit, but nonetheless your application running in 64-bit mode should be much smaller than previous 64-bit versions. For a technical description, check out this article:
          https://wikis.oracle.com/display/HotSpotInternals/CompressedOops

          2. The 64-bit JVM has access to more registers and hence more opportunities for performance optimizations. This helps generate faster code.
          • 2. Re: Latest  32-bit Java 7 compiled with /LARGEADDRESSAWARE?
            800381
            ...

            2. The 64-bit JVM has access to more registers and hence more opportunities for performance optimizations. This helps generate faster code.
            For general edification, 32-bit x86 processes have access to 8 32-bit registers. Since three of those are PC, SP, and FP, usually only 5 are available general-purpose use, although aggressively-optimized code can also use the FP register as a general-purpose register. A 64-bit x86 process, on the other hand, has 16 64-bit registers available, with the same PC, SP, and FP usage. So 64-bit applications in general have access to about 500% more register space than 32-bit applications.