Take the 2-minute tour ×

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

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

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

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
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

7 Answers 7

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


share|improve this answer
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
I read in other sources that a processor cannot use every bit to access memory, is this being considered in your answer? –  Andrey Jun 23 at 14:20

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
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

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

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

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
Up-to-date details for Windows: msdn.microsoft.com/en-us/library/windows/desktop/aa366778.aspx –  Arjan Jul 28 at 21:53

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

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
Of course since current CPUs have this address space artificially limited, it may only be a decade before there aren't enough bits to address every byte on a disk any more. Hopefully by that stage the limits will have been raised, as the way SSDs are going, making an entire disk appear as a section of memory could improve performance dramatically. I wouldn't mind plugging an SSD into a RAM slot instead of into a SATA cable! –  Malvineous Dec 21 at 3:18
@Malvineous I was talking about something more fundamental, even if you limit yourself to 63 bits you can directly address 9223372 TB. And SSDs in a RAM slot already exist, see Sandisk. –  Mark Ransom Dec 21 at 4:16
I wasn't disagreeing with you, I was just pointing out that with current technology there are artificial limits on what you are suggesting (e.g. only 48 or 51 bits of the address brought out to the physical bus). If those DIMM-SSDs catch on we might run out of memory addresses sooner than you suggest, unless these artificial limits can be raised or removed. I agree if the full 64-bits were available then it would be decades before it becomes a problem. –  Malvineous Dec 21 at 10:57
Just for the record I looked at the SanDisk UlltraDIMM link but sadly this isn't technically SSD-as-RAM. It's a 6Gbps SATA SSD, with a DDR3-to-SATA adapter allowing it to be accessed as if it's memory. The additional conversion of memory requests into the SATA protocol introduce some latency and seem a bit messy. Hopefully someone will see the benefit of this and soon release a true memory interface to flash without any unnecessary adapters in between! –  Malvineous Dec 21 at 20:44

Your Answer


