Why is there a 2 GB memory limit for Java.exe on Windows 32-bit Servers


What is Virtual Address Space?

Data readily accessible to the processor are identified by a memory address, which starts at zero and ranges to a max value depending on the processor. 32-bit processors use memory addresses that are 32 bits wide. The 32-bit wide address allows the processor to address 2^32 bytes of memory, which is exactly 4GB. And this is the 4GB memory limit.

 

Why is there a 2 GB address space limit?

The address space might contain things other than memory. When a program loads under Windows, it is managed as a process. One of the most important features of a process is its virtual address space, which holds all of the code and data the process will directly access. In the 32-bit versions of Windows, processes are given a default memory limit of two gigabytes. This limit means has the logical addresses that any process touches varying between 0x00000000 and 0x7FFFFFFF (this is the full range of non-negative numbers that can fit in 32 bit). To defend the system against poorly written applications and device drivers, Windows allocates memory for applications from 0x00000000 to 0x7FFFFFFF. It maps the operating system itself in the range 0x80000000 to 0xFFFFFFF; as much as it can, at any rate. This gives user processes two gigabytes of virtual address space, and gives the system two gigabytes of virtual address space.

Is there an option to work-around the 2 GB limit?
On a system with more than two gigabytes of memory, the system can be booted with the /3GB option to expose more than two gigabytes of address space to each process that’s marked with the large-address aware bit in its executable image. User processes receive three gigabytes of space, then, while the system can use a single gigabyte of address space. However, the benefit of using this extra space can be mitigated by the fact that the system has to compress itself into the remaining one gigabyte of address space.

Reference: http://hardforum.com/showthread.php?t=1035670

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s