An Explanation Of Restrictions Limiting The Java Max Heap (-Xmx) To Around 1500M For 32bit JDK’s On Microsoft Windows [ID 557813.1]

Although the maximum amount of physical memory that can be addressed by a 32 bit address bus is 4Gb,  this space has to include the program code and some data structures required by the operating system (such as the stack space), shared libraries and any variables they define. Such considerations limit how much of the total 4Gb address space can be assigned to the heap area of a running JVM and, in the case of the Microsoft Windows, this limit is generally at 1500M (+/- about 200M).

You can enable 3GB Switch to assign upto 3GB Memory to user process instead of 2

In my computer properties: Advenced->startup&recovery->Settings->Edit

In the [Operating Systems] section, add the following switches to the end of the startup line that includes the

 /fastdetect switch: /3GB

Note: In a Win32 (Windows NT, Windows 2000, Windows XP) operating system, the process can allocate only up to 2 GB (out of the 4 GB virtual address space). The OS reserves 2 GB.
Therefore, for an application like WLS, it is better to limit the maximum Java heap to 1.5 GB when using the JRockit JVM (so that, we will have about 500 MB for the native memory outside of the Java heap). It may be possible to start with 1.9 GB of Java heap; but, when the JVM tries to allocate some space outside of this Java heap, it will run out of memory (native memory) and exit.
There is a /3GB mode in Windows 2000 advanced server, which allows the process to allocate up to 3 GB. If this flag is enabled, then JRockit can take up to 1.9 GB of Java heap. More details on the /3GB mode can be found at this URL:
http://technet.microsoft.com/en-us/library/bb124810%28EXCHG.65%29.aspx

Link:

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=557813.1

Leave a Reply

Your email address will not be published.