7

Possible Duplicate:
Why does Windows only show about 3.5GB of my 4GB+ of RAM?
can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

As you can see in this table, all versions of x86 Win 7 max out at 4Gb.

Is there a technical reason for this or is this just a marketing strategy to get people to buy a more expensive OS?

9
  • if you switch the term used to "32bit" (vs x86) system, using the search here will reveal the answers. might also reveal a load of crud that you dont need :-) but at least the answer exists.
    – Psycogeek
    Dec 30, 2011 at 4:10
  • 2
    No marketing strategy involved here. Dec 30, 2011 at 4:10
  • You should really specify 32-bit instead of x86 Dec 30, 2011 at 4:11
  • 1
    @soandos: Again, the kernel can also have more than 4GB. Heck, processors are capable of more than 4GB. Note the old 16 bit processors could use more than 64K . . .
    – surfasb
    Dec 30, 2011 at 4:19
  • 2
    @kobaltz: Note it's 4gb of address space. You should read the linked answers. In theory, a process can have unlimited virtual memory.
    – surfasb
    Dec 30, 2011 at 4:21

2 Answers 2

16

There seems to be a lot of confusion in the industry about what's commonly called the Windows “4GB memory limit.” When talking about performance tuning and server sizing, people are quick to mention the fact that an application on a 32-bit Windows system can only access 4GB of memory. But what exactly does this mean?

By definition, a 32-bit processor uses 32 bits to refer to the location of each byte of memory. 2^32 = 4.2 billion, which means a memory address that's 32 bits long can only refer to 4.2 billion unique locations (i.e. 4 GB).

In the 32-bit Windows world, each application has its own “virtual” 4GB memory space. (This means that each application functions as if it has a flat 4GB of memory, and the system's memory manager keeps track of memory mapping, which applications are using which memory, page file management, and so on.)

This 4GB space is evenly divided into two parts, with 2GB dedicated for kernel usage, and 2GB left for application usage. Each application gets its own 2GB, but all applications have to share the same 2GB kernel space.

SOURCE: http://www.brianmadden.com/blogs/brianmadden/archive/2004/02/19/the-4gb-windows-memory-limit-what-does-it-really-mean.aspx

[Edit RE: PAE]

x86 processor hardware-architecture is augmented with additional address lines used to select the additional memory, so physical address size increases from 32 bits to 36 bits. This, theoretically, increases maximum physical memory size from 4 GB to 64 GB. The 32-bit size of the virtual address is not changed, so regular application software continues to use instructions with 32-bit addresses and (in a flat memory model) is limited to 4 gigabytes of virtual address space. The operating system uses page tables to map this 4-GB address space into the 64 GB of physical memory. The mapping is typically applied differently for each process. In this way, the extra memory is useful even though no single regular application can access it all simultaneously.

3
  • 2
    What about PAE? (especially since windows implements it)
    – soandos
    Dec 30, 2011 at 4:11
  • @Kobalt Could you please explain "a 32-bit processor uses 32 bits to refer to the location of each byte of memory. 2^32" emphasis mine. Why do you refer to these individual blocks as bytes? If each memory address is a 32-bit address then where does byte which is 8 bits come into the picture?
    – Geek
    Aug 4, 2014 at 16:28
  • 3
    @Geek Each virtual memory address is 32 bits wide. This gives a possible range of addresses from 0 through 0xFFFFFFFF (about 4.3 billion). The thing that is at each of those ~4.3 billion addresses (assuming it's all populated) is an 8-bit byte. There are machines in which memory addresses refer to larger pieces of data, commonly called "words", but Windows doesn't run on any of them. Sep 29, 2014 at 23:11
8

Yes and no.

Natively, a 32-bit processor can only handle 4 GiB of RAM, since there are only 2 ^ 32 = 4,294,967,296 different numbers that can be represented using 32 bits.

Whenever you store something in the memory, you need to save the address to be able to read or manipulate it. Usually, the CPU uses only one register (32 bit in size) to store this address. Since there are only 2 ^ 32 different addresses, anything exceeding the 4 GiB mark remains unused.

However, there are techniques like Physical Address Extension (PAE) that allow a 32-bit OS to address more than 4 GiB of RAM.

Drastically oversimplifying the process, the OS maps each process in a certain part of the memory (called a page table). Each process is still limited to 4 GiB, but this allows the OS to address as much more memory than only 4 GiB.

The 32-bit version of Windows Server 2003 Datacenter Edition, for example, supports up to 64 GiB of RAM.

6
  • 1
    Comment-question by Alex Junyan Li moved from edit to comment: But why it is 4G byte? 32 address lines can access 2^32 (4G) different address, but every address could be a byte or a word(4byte) 32bit --> 4G Byte, when it is a byte 32bit --> 4G * 4 Byte, when it is a word Do you mean there is only 8 data output lines? so every address can only output 8 bits. Why do we have to limit the data lines to 8 lines? Can we make it 32 data output lines? Sep 5, 2014 at 0:35
  • 2
    @AlexJunyanLi : Though x86 architecture uses various widths of the data bus (from 8 bits in 8088 to 64 bits in Pentium and currently more complicated QPI) the memory is still addressable by bytes (8 bits). One of the reasons is backward compatibility another is that byte is still a practical amount of information to be able to address. Sep 5, 2014 at 1:00
  • 2
    @pabouk: all current x86 and x64 CPUs for several generations have used 64-bit memory buses. The low-order three bits of physical (RAM) addresses never come out of the CPU. Nevertheless, each distinct RAM address refers to a different byte. But instructions can reference bytes, or two-, four-, or eight-byte words; a few instructions even work on 16-byte blocks. The address of any multi-byte thing is the address of its lowest-addressed byte. In many cases the size of the datum is implied by the size of another operand. In other cases it's explicitly coded, or in a register. Oct 2, 2014 at 10:12
  • @JamieHanrahan: Thank you for extending my note which was addressed to AlexJunyanLi. I wanted to write just the basic information and not to delve into many details like difference between the physical bus and and addressing possibilities of the machine code instructions, memory access alignment etc. Oct 2, 2014 at 15:17
  • @pabouk: Sorry, I was confused. I would edit my comment to change to @ AlexJunyan but it's long past the five minute deadline... would it be gauche to delete it and re-post it with that change? Oct 2, 2014 at 17:35

Not the answer you're looking for? Browse other questions tagged .