0

there were many questions what determines size of a pointer. basically as a rule of thumb you can say this is processor architecture,

x86 -> 4 bytes pointer

x64 -> 8 bytes pointer

I have seen also that some people here say it is system bus that is responsible for it, but other denied. Let's say architecture tells me what is the size of a pointer.

To address 4GB of RAM you need 4,294,967,296 mappings and pointer of size 4 bytes can address 4,294,967,296 memory locations.

To address 8GB of RAM you need 8,589,934,592 mappings and pointer of size 4 bytes cannot address all possible values. so this is why I cannot have more than 4GB RAM on x86 architecture?

Community
  • 1
  • 1
4pie0
  • 29,204
  • 9
  • 82
  • 118

1 Answers1

2

Amount of RAM is not limited by the architecture (32 or 64 bit). Architecture only decides how much memory can be addressed at a time, by the OS and the programs running on it. On a 32-bit machine, that is, a machine with 32-bit wide memory bus, the OS and the programs can "see" only 4 GB of memory. But that doesn't mean there is only 4 GB of RAM. If the manufacturer has provided for it, you can have 16 GB or 4x4 GB of RAM. In that case, there will be 2 more "hidden" address lines and also there'd be hardcoded logic to decide the levels of those 2 lines, thus selecting any of the available 4 GB RAMs - 00 01 10 11 . These "hidden" address bits are not used by the software layers, so for these layers, they can only use a 4-byte pointer. The number of these "hidden" address lines decides by how much you can extend your RAM.

This is just one example. It depends on the vendor, how they decide to provide for the extra RAM.

sanjeev mk
  • 4,276
  • 6
  • 44
  • 69
  • but application can still address 4GB of RAM so how does it benefit from remaining 3*4GB? – 4pie0 Mar 11 '13 at 18:04
  • 1
    The advantage is, in the total memory available for usage. Program 1 + Program 2 + Program 3 can, in total use 8 or 12 or 11 GB, without each program realizing that the system has more than 4G of memory. – sanjeev mk Mar 11 '13 at 20:45
  • so each application can use different block of RAM, now I see – 4pie0 Mar 11 '13 at 20:49