Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm reading through my computer architecture book and I see that in an x86, 32bit CPU, the program counter is 32 bit.

So, the number of bytes it can address is 2^32 bytes, or 4GB. So it makes sense to me that most 32 bit machines limit the amount of ram to 4gb (ignoring PAE).

Am I right in assuming that a 64bit machine could theoretically address 2^64 bytes, or 16 exabytes of ram?!

share|improve this question
1  
Note that no existing x86 64-bit processor can actually do this. Their caches don't have enough tag bits, their address buses don't have enough width, and so on. 46-bits (8TB) is the maximum for many modern x86 CPUs. –  David Schwartz Jan 31 '13 at 2:40
1  
Theoretically, there is no limit. Even 32-bit CPUs can have an address space above 4 GiB. It depends on how the memory management system is implemented in hardware, which is usually independent of the CPU's word length. Pointers in programs are always word-length, but these are virtual addresses anyways (and not physical), so they are further mapped into a different address space. –  Breakthrough Apr 22 '13 at 19:04
add comment

migrated from stackoverflow.com Nov 3 '09 at 19:31

This question came from our site for professional and enthusiast programmers.

7 Answers

Theoretically: 16.8 million terabytes. In practice: your computer case is a little too small to fit all that RAM.

http://en.wikipedia.org/wiki/64-bit#Limitations_of_practical_processors

share|improve this answer
7  
Too small.... today!!!! –  snicker Nov 3 '09 at 20:32
    
16.777216 million tebibyte. If you want to be precise. –  totymedli Feb 5 at 0:05
add comment

To supplement Matt Ball's answer, the current largest stick of RAM I can find on one particular online retailer is 32GB. It would take 32 of these to reach 1 terabyte. At about a half inch per stick this brings us to a devoted 16 inches of space on your motherboard for a terabyte of commercial ram. To reach 16.8 million terabytes would require a motherboard 4,242.42 miles. The distance from LA to NYC is about 2141 miles, so the motherboard would stretch across the country and back to accomodate that much RAM.

Clearly this is impractical.

How about we didn't put our RAM all in one row like on most motherboards, but instead placed them side-by-side. I want to say the average stick of ram is about six inches long, so if we allow a half an inch for width, you can have a square unit of 12 sticks of ram in a 6 inch square. Let's call this square a RAM-tile. A RAM-tile then holds 384GB of RAM. To reach the required 16.8 million terabytes in 384GB tiles would take 44.8 million tiles. Let's be messy, and use square root of that to conclude that this will fit in a square of 6693 by 6694 tiles, or 13,386 by 13,388 feet, which is close enough to 2.5 miles squared, enough to cover downtown Seattle in shadow, as if they didn't already have enough to complain about.

share|improve this answer
1  
Too big. Why are you laying them flat? You can get it all in a 100' cube. You'll probably need liquid nitrogen to keep it cool, though! –  Loren Pechtel Nov 28 '13 at 20:37
    
the amount of nitrogen gas that would boil to would pose a safety risk to the great people of Seattle –  Conrad.Dean Feb 5 at 2:46
add comment

Effectively, yes - processes could, in theory, address 2^64 bytes of memory. But as you pointed out, there are ways around this limit.

share|improve this answer
add comment

You would be correct. You can address up to 16 exabytes of RAM. Now.. whether the operating system can handle it would be another question....

share|improve this answer
add comment

Most of today's current processors have some sort of artificial limit on their address size. For example, the AMD64 architecture has a 52-bit limit on physical memory and currently only supports a 48-bit virtual address space. (Via Wikipedia). However yes, physically ~16.4 million terabytes is possible.

share|improve this answer
add comment

Would be also good to note that the operating system has its own limitation about memory in a 64-bit architecture.

For example, see what wikipedia sais about Windows Vista 64:

All 64-bit versions of Microsoft operating systems currently impose a 16 TB limit on address space. Processes created on the 64-bit editions of Windows Vista can have 8 TB in virtual memory for user processes and 8 TB for kernel processes to create a virtual memory of 16 TB.[29] In terms of physical memory Windows Vista 64-Bit Basic supports up to 8 GB of RAM, Windows Vista 64-Bit Home Premium supports up to 16 GB of RAM, and Windows Vista 64-Bit Business/Enterprise/Ultimate supports up to 128 GB of RAM.[8]

share|improve this answer
add comment

The biggest advantage to 64 bits is not the RAM it can address, but everything else. You can define an address for every byte on a disk, for example, and increasing disk capacities will not invalidate this for decades.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.