Quantcast

Maximum PC

It is currently Sat Aug 23, 2014 6:51 am

All times are UTC - 8 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Memory addressing in a 32-bit OS (AKA: Where's My RAM?)
PostPosted: Thu Dec 27, 2007 4:14 pm 
Million Club [PC]*
Million Club [PC]*
User avatar

Joined: Sun Feb 12, 2006 5:29 pm
Posts: 4914
Location: Motor City, folding for Mom
The basics of memory addressing in XP or Vista 32-bit:
The total number of system address space happens to exactly equal the amount of address space needed by 4GB of physical memory.
However, onboard devices / resources (NB/SB chips, parallel/serial ports, NIC, etc.) also need address space, as do PCI/PCIe/AGP cards. Devices & resources are allocated address space from the top of the pool, down. This works out to (depending on the specific system) to (typically) 3.12~3.5GB worth of space left. 3.5 is a rare high number; some system configs put that number as low as 2.9GB.
And, the gotcha: onboard memory on a videocard also needs address space. This is also allocated from top-down, after system resources.
So: 4GB (equivalent) address space - resources = 3.12GB available - vidcard memory (lets say 256MB, unless he's got a 512MB frame buffer) = 2.87GB available space. Increase the frame buffer (or, especially, run SLI/Crossfire), and the number shrinks further. Sucks for the people with a pair of 768MB buffers, as they can't even address 2GB RAM.

The math: each bit of memory on that stick requires an address. 8 bits/byte, 1,024 bytes/KB, and so on.
But, so does each bit of memory on that videocard.
Available addresses:
32 bit = 34,359,738,368 addresses.
64 bit = 1,099,511,627,776 addresses.

chart to explain it better:
Image
See that yellow area? As you add more onboard devices (or, more videocard RAM), it grows. Down.
As it grows, the grey area (RAM address pool) gets smaller. Smaller it gets, the less RAM you can address.

Sources:
http://www.codinghorror.com/blog/archives/000811.html

And, good read (with layman's terms!), found by Nastyman
http://www.dansdata.com/askdan00015.htm

*Edit: with 4GB RAM installed, Vista x86 SP1 will show all four gigs in System Properties; however, Task Manager (as well as most system-monitor utilities) will continue to show only that RAM that's actually addressable by the system. So, if the BIOS and System Properties show 4GB, but Task Manager only reports, say, 2.8GB, that's normal.
(updated 5 July 2008)

*Edit (16 Sep 09):
Sovereign installed Win7 (x86) on one of his machines, which has 4GB RAM installed.
The Resource Monitor (in Task Manager) gives a very good graphical representation of where, exactly, The Missing RAM went:
Soveriegn wrote:
Image
The "Hardware Reserved" shows the exact amount that was mapped to Memory-Mapped I/O devices (like ATI HyperMemory, PCI devices and the like).


Top
  Profile  
 
 Post subject: Re: Memory addressing in a 32-bit OS (AKA: Where's My RAM?)
PostPosted: Sun Nov 28, 2010 12:11 am 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
cup wrote:
Sucks for the people with a pair of 768MB buffers, as they can't even address 2GB RAM.

Sure they can address those 2GB of ram. Presumably, they could fill the buffer with an image, make a system call and see the image on their monitor. Honestly, I don't see the big deal. You have the same MMIO regardless of whether you have 3GB or 4GB of memory in the system. Given that most desktop computers now have either a 256MB or 512MB video card, you're not wasting all that much memory... probably less than $10 worth!

cup wrote:
The math: each bit of memory on that stick requires an address.

Wrong. I don't believe there has ever been a "bit" addressable computer and modern computers certainly aren't addressed in this manner. If you look at the ISA for most processors, you'll see that not only can you not load/store a single bit, but typically, you also have a variety of "boundary" conditions (ie 4 byte, 8 byte, even 16 and 32 byte boundaries depending on the instruction).

cup wrote:
http://www.codinghorror.com/blog/archives/000811.html

This page contains quite a few errors... the links that follow are better.

*Edit: with 4GB RAM installed, Vista x86 SP1 will show all four gigs in System Properties; however, Task Manager (as well as most system-monitor utilities) will continue to show only that RAM that's actually addressable by the system. So, if the BIOS and System Properties show 4GB, but Task Manager only reports, say, 2.8GB, that's normal.
(updated 5 July 2008)

*Edit (16 Sep 09):
Sovereign installed Win7 (x86) on one of his machines, which has 4GB RAM installed.
The Resource Monitor (in Task Manager) gives a very good graphical representation of where, exactly, The Missing RAM went:
Soveriegn wrote:
Image
The "Hardware Reserved" shows the exact amount that was mapped to Memory-Mapped I/O devices (like ATI HyperMemory, PCI devices and the like).
[/quote]


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group