"What's with the 3Gb memory barrier"?

Unfortunately, going beyond 2 GB requires not only a different way to compile your program, but also the use of unsigned 32 bit integers instead of regular ones (quite a difference) to address memory locations.
Pointers are "unsigned". Offsets/indices may be signed ints, but even there it only matters for bounds checking when accessing a byte array > 2 GiB.
 
Pointers are "unsigned". Offsets/indices may be signed ints, but even there it only matters for bounds checking when accessing a byte array > 2 GiB.
Yes, but you only need one somewhere to break it. Especially sizes have always been a problem.
 
Ok, so last night on a whim I upgraded from 2Gb to 3Gb on an XP SP2 system...does this mean I've reached my memory upgrade limit for a 32-bit OS?
 
i dont get this 8800 using that much ram
surely with the amout of memory they have onboard they shouldnt use any ?
 
i dont get this 8800 using that much ram
surely with the amout of memory they have onboard they shouldnt use any ?

It's not using the motherboard memory, it's using the address range to map in its 768 megs of memory so it can be accessed by the drivers.
 
Since we are on this topic, think it's chance to clarify on a few things. What exactly constitutes device memory (ie, how is it determined whether the memory has to be mapped into the 4GB space)?

For eg:
- 128MB Ageia physics card
- 64MB X-RAM on Xi-Fi soundcard
- 8MB/16MB cache on HDDs/RAID cards
- USB memory sticks

Are all the above mapped into the 4GB space? I don't think so for the last two (memory sticks and caches) but it's nice know when/why the 4GB space is made use of or not.
 
a definite no for the latter two items : your PC isn't even aware of the cache's existence, and USB sticks are one form of storage, a file system driver (fat, ntfs or other) takes care of it.
now for on-board ram such as sound cards and ageia : my guess is the driver manages that and transfers to and from the device's ram are done through DMA.
Graphics card's ram has a special status afterall, which relate to AGI/PCIe texturing.
 
When exactly device mapping happens? Is it done by mainboard on boot or does it require device driver in OS to activate it?
The range of addresses we se see in Device Menager - is it physical address range? If so, how page translation works in that case? Is it visible in OS linear address space?
 
Last edited by a moderator:
now for on-board ram such as sound cards and ageia : my guess is the driver manages that and transfers to and from the device's ram are done through DMA.
Note that graphic cards can do that just as well, there is no requirement that all their ram must be mapped and addressable from the cpu.
In fact, I know that (agp) radeons exist which don't have all their ram mapped. Accessing the local vram directly from the cpu-side is usually far less efficient than using the gpu blitter anyway.
Graphics card's ram has a special status afterall, which relate to AGI/PCIe texturing.
Not really. GART size is just additional virtual address space used for agp texturing, but it's not directly related to how (and how much of) the local vram is mapped.
 
If you go into device manager and choose View -> Resources by Type and expand the Memory tree you'll see exactly what the PCI mapping of your system looks like.
 
I wonder if its possible to dynamically map/unmap device address range when Os is running to get access to physical memory?
 
I wonder if its possible to dynamically map/unmap device address range when Os is running to get access to physical memory?
You never access physical memory directly. You cannot. You always access the memory in the segment that is mapped to your own 2GB adress space, which is translated to lineair memory, which the OS maps to physical, virtual and device memory.

When your application starts, it is allocated it's own 2GB memory space. If you want to access something outside that, like a PCI device, you have to ask the OS (driver) to do it for you.

That 2GB of memory your application can use isn't allocated before you try to use it. It's only potential memory, so to say. As soon as you read or write it, the processor looks in it's page table to see if there is a page (originally 4kb, but 2MB pages are used as well, to keep the size of the page tables down) of memory allocated to that adress, and if it isn't, it asks the OS to do so.

And when the OS has allocated all the memory, it has to swap pages to disk when more is needed. And retrieve them when they are needed again.

So, the memory your application uses is distributed randomly across your physical memory and page file. There is no way for your application to find out where it is actually residing physically. And there is normally a much larger amount of adressable memory available to all the applications and devices together than can actually be mapped.
 
Side note: Be careful if you intend to try to run a Sound Blaster X-FI and have 4GB or more. They have some driver bugs with this, irrespective of the 32-bit addressing limitations - this occurs on 64-Bit, too.

Supposedly a driver that fixes this should be coming ... at some point.
 
Vista 64bit is having no issues with the following hardware and software mixes for me. [snip]

I started with Vista 32-bit in early February. As the wrath of the OS godz failed to rain on my Vista 64-bit buddies, I decided to switch to that several weeks ago. At the same time, I upgraded from 2GB to 4GB of RAM.

I've generally been pretty happy with it. The two pieces of funkiness I had were one hardware and one software.

1). The hardware was my Creative X-Fi gamer now sounds like a radio station that is too far away. I had to turn it off and use the onboard sound. For now anyway. Maybe forever? We'll see.

2). Adobe Acrobat Pro, it turns out, never supported 64-bit OS in the past. It worked fine on Vista 32-bit, but no go on 64-bit. Adobe has recently released a patch for v8 of Acrobat Pro that does work on 64-bit OS, and integrates with Office 2007. That's 8.1. However, if you have an earlier version of Acrobat Pro than 8 you're going to have to upgrade to 8 to qualify for the patch or give up Acrobat Pro. So I ended up upgrading from v7 when I otherwise probably wouldn't have (lots of software I jump a couple versions between upgrades as often I see a company's upgrade path as more about upgrading their revenues than my capabilities)
 
Thanks Frank!

I should make my question more clear (blame my poor english). I wondered if its possible for OS/device driver to temporarily unmap adress range.
Well, the OS can do that (although I doubt Windows does), but there is no way for you or an application to do so.

For example, if a device like a video card is mapped to some range, then after the driver starts it keeps pointers to adresses in that range. If the adress range would be changed, you would have to reboot the driver. And Windows isn't really able to do that, or keep track of the pointers.

You can with Linux/Unix, though.


Btw, it also depends on your BIOS settings. If you let the BIOS allocate those ranges, you're stuck with them.
 
Last edited by a moderator:
Side note: Be careful if you intend to try to run a Sound Blaster X-FI and have 4GB or more. They have some driver bugs with this, irrespective of the 32-bit addressing limitations - this occurs on 64-Bit, too.

Supposedly a driver that fixes this should be coming ... at some point.


Oh, Doh! That was right above mine and I didn't see it. Yes, I will attest to that with 4GB of RAM and Vista 64-bit. As I did both at the same time, I wasn't entirely sure which to blame. Sounds like from yours it's the 4GB part, which seems awfully odd. But then Creative + awfully odd driver problem = par for the course. So, I guess I shouldn't be surprised.
 
Didn't mean to bump an old topic, but it came to light from several recent topics related to this, so I don't feel so bad with responding... ;)

Let me/us know how you get on with 8GiB in your main day-to-day system, since I don't know many others with that amount and occasionally it trips me up in subtle ways.

I just got the second set of DDR2 back from RMA. I now have the full 8Gigs installed. It seems fairly stable for my typical day to day usage. I haven't tasked the system much, but I hope to do so this weekend. It is really nice to be able to run a couple instances of virtual systems, giving each one 2Gb to use and not be swapping to death. It's nice seeing 79% (6401Mb) free memory when sitting at the desktop. I :love: it.

I haven't figured out if I need to bump the swap space yet and I don't use hibernate. I'm currently using 4608 Mb swap file and 2048 Mb ready-boost cache on a 4Gb 200x flash drive (Patriot Xporter XT).
 
I currently use a system managed pagefile size, which appears to be 8.3GB at the moment, and no Readyboost (are you planning on removing yours?). My pagefile is on my scratch RAID array (noisy disks too) and it barely gets touched.

Like you I run a couple of VMs constantly in the background, although only one with access to 2GiB of memory, the other has just 512MiB available (and rarely uses anywhere near that).

I've been keeping an eye on it recently for day-to-day work and it seems that I use between 5 and 6GiB on a constant basis, so maybe 8GiB was overkill, but neither did I particularly want to run 3GiB per channel. It just felt wrong when I was considering what to buy at the time.

I've hit 90%+ used on a couple of occasions and it's just nice to know that I've got the physical memory for that and I don't really have to worry. However, a couple of apps that I use that aren't large address space aware spoil it a little bit, falling over at times, and things like Photoshop still don't really seem to know what to do with lots of memory on a 64-bit system.

What made you decide to get 8GiB in the first place, other than good price?
 
As for going with 8 versus 4, was to remain within theme of the new system build. The other reason was to build it once and not have to fuss with an upgrade in the future that wasn't video card related. Of course being able to run virtuals and have memory to spare is a sweet benefit.

As for the ReadyBoost, not sure if I'll keep it or not. The thumb drive doesn't get used too often for other purposes. It would be a bit of a waste not to use it. T

This new system has a mixed theme -- entirely overdoing it and having something new to toy around with. That theme explains most of the reasons why going with more than 2Gig and Vista 64.
 
Back
Top