Author |
Message |
dcvg
|
Posted: Thu Sep 17, 2009 10:48 pm Post subject: RAM addresses |
|
|
My understanding is that each address in RAM can store 32 bits but how many addresses are there in RAM? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
OneOffDriveByPoster
|
Posted: Fri Sep 18, 2009 8:25 am Post subject: Re: RAM addresses |
|
|
An address in RAM can store different numbers of bits depending on the architecture of your system. Most systems are byte-addressable and have 8-bit bytes. When you ask about the number of addresses in RAM, you may be asking about: http://en.wikipedia.org/wiki/Virtual_address_space |
|
|
|
|
 |
Tony

|
Posted: Fri Sep 18, 2009 8:31 am Post subject: RE:RAM addresses |
|
|
I'm pretty sure that one can address an exact byte of memory ( http://en.wikipedia.org/wiki/Byte_addressing ), although addresses might be incrementing in blocks of 4 (or another amount) for convenience.
The address space will depend on the system. A 32 bit architecture would have 32 bits to describe an address, thus 2**32 = 4 GB.
[edit]but that would be the virtual address space, as OneOffDriveByPoster points out above. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
DemonWasp
|
Posted: Fri Sep 18, 2009 10:51 am Post subject: RE:RAM addresses |
|
|
What Tony is referring to is called "Unaligned Access" - accesses to memory that are not aligned on the standard 4-byte (32-bit) boundaries (or, on 64-bit machines, 8-byte boundaries). On some architectures these are directly possible; on others, they're emulated by getting the block(s) required and editing them on the CPU with bit-shift and OR operations.
Also worth noting is that large sections of the addressing space are typically reserved for things like hardware-device addressing (mostly graphics cards here) and the OS's own data structures. |
|
|
|
|
 |
|