On address space sizes

Articles

We are well into the 64-bit era, and a 64-bit pointer allows for an addressable space of 2^64 bytes, or 16 exabytes.

This not only allows for future proofing, but also for the memory to be used in a fundamentally different way to 32-bit or 16-bit systems.

Lets start from the smallest address size, and work up to infinity.

8 bit addresses

Total addressable RAM: 256 bytes

This may be a small microcontroller, a very old computer or a program running in a tiny emulator as part of a larger program. (Maybe you have customisable characters in a game, and their interactions with the game world are mediated by a small program running in a virtual machine with 256 bytes of working memory per character.)

At this size, every byte counts and you are carefully selecting the address of every variable and instruction (this RAM may also include the instructions of the program itself, although this could be stored separately depending on how the system is structured).

If there is a stack, it will be very small, and you will have to be careful how deeply nested your function calls are.

There may be hardware or VM inputs and outputs which are mapped into memory (for instance on a simple microcontroller there may be specific bytes in memory which can be changed to turn on and off LED lights or display characters on a screen)

If the program has to fit in the same 256 bytes of RAM it is very limited in what it can do, and may have to be very carefully optimised to fit.

16 bit addresses

Total addressable RAM: 64 kilobytes

32 bit addresses

Total addressable RAM: 4 gigabytes

This is the first address size where the amount of RAM may be less than the addressable size.

64 bit addresses

Total addressable RAM: 16 exabytes

The amount of physical RAM is now likely much less than the addressable size.

128 bit addresses

Total addressable RAM: 256 yottabytes

256 bit addresses

Total addressable RAM: 4.3 x 10^38 bytes ????

256 bits is interesting because it is the size where two hashes (or even random values) are astronomically unlikely to collide.

Indeed, the space is so large that to allocate a block of memory you can just generate a random number and use sequential addresses to store data of any practical length without worrying about overwriting any other piece of data.

This address space is also large enough to store structured information in the address itself, such as a hash of the data it points to for content-addressable storage.

You can make unbounded dimensional arrays which can grow in size and number of dimensions without reallocation

1024 bit addresses

Total addressable RAM: 1.8 x 10^308 bytes ????

1024 bit addresses can be hashed to 256-bits and stored in a 256-bit memory space.

1024 bits is large enough to use the LSEQ algorithm to indefinitely generate addresses between two existing stored values, without worrying about collisions.

8192 bit addresses

Total addressable RAM: 1.8 x 10^308 bytes ????

1048576 bit addresses (1MB addresses)

Total addressable RAM: 1.8 x 10^308 bytes ????

This size is included just too see what happens as the address space grows large but not infinite.

With a whole megabit of address you can store many types of data but still have to consider size if you are using the bytes of the address as entries in an array of non-fixed size.

Unlimited addresses

Not infinite, but addresses of any length without limit.

Infinite addresses

Literally infinite addresses gives an address for every real number.