It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
For example I have a 1GiB card, I play a none Large Address Aware game like Oblivion. Do I only get to use 1GB system RAM (with the 1GiB VRAM of course) or do I get the 2GB system and all the VRAM on my card?

And say the game is Large Address Aware. Do we then get 3GB system RAM plus the VRAM or is the VRAM included in the 3GB. And for a 64 bit OS do we get 4GB plus the VRAM or is the VRAM included in the 4GB.
Post edited February 03, 2013 by FreedomWings
This question / problem has been solved by Psyringeimage
If you only have a 1 GB card, than that is all you will get. The Vram of that will still go towards whatever you are running but you won't be able to get the 2GB.

Don't quote me on that but that is just off the top of my head when I use to have low GB ram as well. If you can and you have a desktop I would really try to upgrade it down the road.
The GPU's RAM is mapped to a region at the top of the memory map (typically a window of size 256MB into that RAM). There's no overlap between this and the 2GB application region.
Okay, I could do with some clarification on this myself as I seem to be missing something.

A 32-bit OS can address a maximum of 4GB of memory:
2^32 bytes = 4294967296 bytes = 4194304 Kilobytes = 4096 Megabytes = 4 Gigabytes
However, the addressable memory for a 32-bit application is only 2GB. Why is this?

Next up, how is the 2GB addressable memory allocated? If the GPU has 2GB memory on it, does that take up the full 2GB addressable space or does the system RAM take priority? Or is there a set size set aside for the GPU memory with the rest taken up by system RAM?

Lastly, I've heard of programs that can patch 32-bit applications so that they become large address aware (which also helps stop them crashing by hitting the 2GB cap). Is this something that we will have to come to do as normal as systems get more and more memory (both system and GPU)? And what programs are recommended to do this? How do we even know which programs need to be made large address aware?
avatar
skylessnight: If you only have a 1 GB card, than that is all you will get. The Vram of that will still go towards whatever you are running but you won't be able to get the 2GB.

Don't quote me on that but that is just off the top of my head when I use to have low GB ram as well. If you can and you have a desktop I would really try to upgrade it down the road.
I don't think you got my question, added some clarification. There is nothing for me to upgrade that applies here.
avatar
ET3D: The GPU's RAM is mapped to a region at the top of the memory map (typically a window of size 256MB into that RAM). There's no overlap between this and the 2GB application region.
Can you elaborate, I don't understand.
avatar
korell: However, the addressable memory for a 32-bit application is only 2GB. Why is this?
From what I have read it has to do with stability and compatibility. Although I suspect it has more to do with the average unaware user getting out of memory errors.
avatar
korell: Next up, how is the 2GB addressable memory allocated? If the GPU has 2GB memory on it, does that take up the full 2GB addressable space or does the system RAM take priority? Or is there a set size set aside for the GPU memory with the rest taken up by system RAM?
That is another way of saying what I am asking.
avatar
korell: Lastly, I've heard of programs that can patch 32-bit applications so that they become large address aware (which also helps stop them crashing by hitting the 2GB cap). Is this something that we will have to come to do as normal as systems get more and more memory (both system and GPU)? And what programs are recommended to do this? How do we even know which programs need to be made large address aware?
This will not be the norm. Basically if the program crashes from running out of memory patch it, if not it should be fine. Although recently I have heard a good number of people reporting that making games LAA whether they need it or not improves performance, sounds strange. I do not know why that would work.
Post edited February 03, 2013 by FreedomWings
Try this: http://www.ntcore.com/4gb_patch.php

I'm not sure how effectively it works, I recall playing some game that required about 1.5GB of RAM and at least 500MB VRAM, but after I "patched" the game's exe it crashed less often.
The matter is a bit complicated. I'll offer quick answers first, and then add a rather lengthy analogy, which (in the past) has helped me to explain the technical details.

First, some quick answers:
avatar
FreedomWings: For example I have a 1GiB card, I play a none Large Address Aware game like Oblivion. Do I only get to use 1GB system RAM (with the 1GiB VRAM of course) or do I get the 2GB system and all the VRAM on my card?
You get 2GB system RAM and all the VRAM on your card. The VRAM is not "deducted" from your main memory, it just occupies a portion of the available address space. (If that's too technical, see my analogy further below.)
avatar
FreedomWings: And say the game is Large Address Aware. Do we then get 3GB system RAM plus the VRAM or is the VRAM included in the 3GB.
A game that is Large Address Aware can allocate up to 4GB of address space. This is independent of the actual physical RAM in your machine. Your amount of VRAM does not influence this. However, if you have a 32-bit Windows, then the operating system is limited to 4GB of address space, and has to reserve some of that space for resources like the video card. Typically (in 32-bit Windows) the operating system allows programs to use only 2GB of address space, no matter whether or not they are Large Address aware. In such an environment, making a porgram large address aware simply does nothing. Most 32-bit Windows version can be set up so that they allow programs to occupy a larger part of the available address space, e.g. 3 GB. In this case, programs that are large address aware can allocate up to 3 GB of memory. However, Windows now has less address space available for its own processes, which may cause problems, particularly when you have a lot of VRAM. In some configurations, it may not be possible to hand over 3 GB to the program. Whether or not this will occur, depends on your mainboard, your graphics card, and your operating system. It's not a question that can be easily answered, basically only people with exactly the same hard- and software configuration as yourself can provide a truly reliable answer.
avatar
FreedomWings: And for a 64 bit OS do we get 4GB plus the VRAM or is the VRAM included in the 4GB.
In a 64 bit OS, a program that's large address aware can allocate up to 4 GB of memory. The VRAM is totally separate from that. The operating system has a huge address space to work with, so it can hand over 4 GB of it to the program, and still have enough address space to account for system resources. You need to understand that the limitation is one of address space, not of physical memory (again - if that's too technical, see below).
avatar
korell: A 32-bit OS can address a maximum of 4GB of memory:
2^32 bytes = 4294967296 bytes = 4194304 Kilobytes = 4096 Megabytes = 4 Gigabytes
However, the addressable memory for a 32-bit application is only 2GB. Why is this?
Because 32-bit Windows reserves 2 GB of address space for its own processes and resources.
avatar
korell: Next up, how is the 2GB addressable memory allocated? If the GPU has 2GB memory on it, does that take up the full 2GB addressable space or does the system RAM take priority? Or is there a set size set aside for the GPU memory with the rest taken up by system RAM?
That depends on the specific combination of mainboard (BIOS), graphics card, Windows version, and drivers. With some earlier combinations, a 1 GB graphics card would need to occupy 1 GB of address space. This became impractical when the memory on graphics cards began to outgrow the 2 GB limit all by themselves. Modern cards can work with less address space, but it depends on your BIOS and on your software (operating system, drivers) whether your machine can make use of that.
avatar
korell: Lastly, I've heard of programs that can patch 32-bit applications so that they become large address aware (which also helps stop them crashing by hitting the 2GB cap). Is this something that we will have to come to do as normal as systems get more and more memory (both system and GPU)? And what programs are recommended to do this? How do we even know which programs need to be made large address aware?
As a general rule, _only_ make a program large address aware if it's crashing and if you can see (in the task manager) that it uses up at least 1.5 GB of memory.

Making a program large address aware is a very simple change - it's achieved by switching a single bit in the program's header. There are numerous "patch" programs which can do this. I don't know of a specific one that I would recommend, just choose one that has a lot of downloads. The process is so simple that I doubt that any patch program could get it wrong.

The problem is rather that not every application can handle large addresses. The patch programs only set a flag that tells the operating system "Hey, this application can handle addresses larger than 2GB". They don't check whether the programs actually _can_ handle those addresses - in fact, checking that would require a thorough analysis of a program's code, and is way out of scope for those patch programs. So, making a program large address aware may very well break it, because it may have been written in a way that it can't correctly interpret addresses larger than 2GB.

That's the quick answers I can provide, I'll post my (non-technical) analogy in the next post. :)

Feel free to ask questions if you have them, the matter is rather technical, and understanding it correctly requires knowledge of technical details that users aren't otherwise required to have (and which therefore isn't widespread).
Ok, here's some general information about "large address aware"-ness, in a way that hopefully doesn't require a degree in computer science to understand:


1. There's an important difference between available memory and address space. Available memory is the total size of RAM in your machine (usually about 2-8 Gigabyte), plus your "virtual memory" - that's hard drive space set aside for Windows to use as swap space when there's not enough RAM. You can envision your computer like a huge cloakroom, in which clothes are constantly stored and retrieved. Your RAM is the main cloakroom, it provides quick access. Your virtual memory is an additional storage space behind the main cloakroom - it offers additional space, but it takes longer to access.

2. Address space is, in our cloakroom analogy, the range of retrievement numbers that can be given out to customers. This is NOT related to the actual capacity of the cloakroom, it's just a fixed amount of "number slips" that are printed for every cloakroom, no matter how much storage capacity an individual cloakroom actually has. This leads to two possible problems:

Problem A: There may be more number slips than there's actual cloakroom capacity, so someone may want to store a cloak, and there are still numbers that could be given out, but there's simply no capacity left to store the cloak. In this case the cloakroom will stop to operate (in PC terms: If an application tries to allocate more memory than the total memory of your machine, then it will crash).

Problem B: The number slips may run out although there's still room in the cloakroom, so someone may want to store a cloak, but can't, because there's no number slip that he could be given, even though there's still a lot of free space in the cloakroom. In this case, the customer will not be able to store his cloak (in PC terms: If an application tries to allocate more address space than your operating system provides, then it can't store any more data and will most likely crash).

3. You can envision a 32-bit Windows as having about 4 billion number slips that can be given out. However, half of those are reserved for cloakroom employees (i.e. Windows' own processes, which require memory and address space as well). So a single customer (an application) can at maximum have access to 2 billion slips, and store 2 billion cloaks - even if the cloakroom has room for much more.

4. Lately, many customers have complained that there aren't enough slips for them. Therefore, some cloakrooms have reduced the number of slips that their own employees can use, in order t increase the number available to the customers. In computer terms: Because many programs required more than 2 Gb of address space, Windows introduced a setting that allows it to give applications up to 3 GB of address space. This setting is activated by booting Windows with a special command, the "3GB switch". Note that there are still only 4 GB of address space in total, it's just divided differently: Previously, it was split in half between Windows and the application. With the 3GB option switched on, the application gets 3 GB of address space, while Windows will have to make do with 1 GB. In our cloakroom analogy, this means that 1 billion number slips that previously were reserved for cloakroom employees, can now be used by the customer.

5. Of course, this only works if the customer actually understands numbers bigger than 2 billion. In PC terms, this is signified by a "flag" that can be set (or not) inside each program. This flag signifies to the operating system that this application can handle more than 2GB of address space (in other words, that the application is "large address aware"). Of course, this flag is only effective if used together with the 3GB switch mentioned above.

If you make an application large address aware, but don't set the 3 GB switch in your Windows, then your application keeps signaling Windows that it is capable of handling more than 2 GB of address space, but Windows will never give it more address space, because it has reserved 2GB for its own processes already, so it can't give more than 2 GB to the application.

If you set the 3GB switch in your WIndows, but run a program that is not large address aware, then Windows is limiting itself to 1 GB of address space, and would be capable of handing over up to 3 GB to the application, but it never actually does, because the application tells it that it can't handle addresses bigger than 2GB.

6. In a 64-bit operating system, the address space is much, much larger than 4 GB. (It's like a new form of cloakroom which has many more number slips than the previous versions.) However, the customer still needs to understand the numbers given to him. In PC terms: A 32-bit program that has doesn't have the "flag" enabled, will still only understand numbers up to 2 billion. A program that _has_ the flag enabled, will understand numbers up to 4 billion. A native 64-bit program will understand numbers much, much larger.


Hrm, quite a wall of text (sorry). But I hope it helps to understand why there are different types of memory limitations, and what the mysterios 2 GB barrier, 3 GB switch, flag, and 32-bit vs 64-bit addressing, mean in terms of a game's playability and stability. Feel free to ask further questions. :)
avatar
Psyringe: ..
Applications rarely use real memory addresses nowadays though, do they? Several 32-bit applications using 2 GB RAM each could easily run on a 64-bit system, and each application think they're using addresses 0-2bn while in reality the operating system is managing the memory for them (giving application A blue slips numbered 0-2bn and application B red slips with the same numbers, while in reality putting both at completely different addresses).

That is, even a 32-bit OS doesn't "reserve" everything above 2GB to itself, but rather can let the applications share what's left after the OS processes have taken their part (with a maximum of 2-3 GB per application).
Post edited February 03, 2013 by Miaghstir
avatar
Psyringe: ..
avatar
Miaghstir: Applications rarely use real memory addresses nowadays though, do they? Several 32-bit applications using 2 GB RAM each could easily run on a 64-bit system, and each application think they're using addresses 0-2bn while in reality the operating system is managing the memory for them (giving application A blue slips numbered 0-2bn and application B red slips with the same numbers, while in reality putting both at completely different addresses).

That is, even a 32-bit OS doesn't "reserve" everything above 2GB to itself, but rather can let the applications share what's left after the OS processes have taken their part (with a maximum of 2-3 GB per application).
Yes, that's correct. And it's a weakness of the cloakroom analogy, but it's still the best one I could come up with. I left that detail out of my post because (imho) the matter is complicated enough without it already, and (in my experience) it's usually not relevant to the people who are asking these questions. They usually aren't interested in running several memory-hungry applications side by side, but rather in making one memory-hungry application run at all. ;)

But you're absolutely right, yes. :)
avatar
ET3D: The GPU's RAM is mapped to a region at the top of the memory map (typically a window of size 256MB into that RAM). There's no overlap between this and the 2GB application region.
avatar
FreedomWings: Can you elaborate, I don't understand.
The address space of the application is used for both the application and the system. The system memory area is used amongst other things for memory mapped devices. To see what memory range devices take, open the device manager, right click the device (such as your graphics card under "Display adapters") and choose Properties. Choose the Resources tab and you'll see the memory ranges the device uses. For example, 90000000 to 9FFFFFFF, a 256MB range.

In a 32-bit app all the address space available is 32-bit (4GB), so it must be divided between the system area (with these device memory ranges) and the application. The simplest division is 2GB each, using one bit to distinguish which memory area is which. This has traditionally been used, so some applications still assume that bit is clear in app memory, and use it for their purposes, which is why by default this division was kept. The system area doesn't require this much memory, so it's possible to give applications 3GB, but they have to be compiled with a special flag to let the system know that they're not assuming anything about that bit.

As for why graphics cards can be mapped to a 256MB area even though they have a lot more memory, that's because the system can't directly access the card's RAM. It can put things in the RAM area the card provides, and the card can read that and copy it anywhere in its memory.

By the way 32-bit systems aren't limited to 4GB. Processors have long allowed the system to use more RAM, although each application still has only 4GB of address space. Microsoft artificially limits consumer OS's to using 4GB on 32-bit versions of the OS. There are utilities which allow using the extra RAM for a RAM disk or cache even on a 32-bit system.

I hope this makes things a little clearer.

Edit: From a little further reading I did, it looks like XP did have the graphics card RAM take lots of RAM, it's only Vista and up which offer the smaller window. This might mean that a 2GB card on XP might cause problems. I haven't dug enough to know for sure.

Edit2: I'm not sure what happens with video RAM in 32-bit apps on a 64-bit system. Code running in kernel mode (i.e., operating system mode) can use 64-bit addressing, which is why more RAM is available to the (large space aware) 32-bit application. However, part of the graphics driver runs in user mode (that's something that Vista added; in XP it ran in kernel mode only).
Post edited February 03, 2013 by ET3D
avatar
ET3D: Edit: From a little further reading I did, it looks like XP did have the graphics card RAM take lots of RAM, it's only Vista and up which offer the smaller window. This might mean that a 2GB card on XP might cause problems. I haven't dug enough to know for sure.

Edit2: I'm not sure what happens with video RAM in 32-bit apps on a 64-bit system. Code running in kernel mode (i.e., operating system mode) can use 64-bit addressing, which is why more RAM is available to the (large space aware) 32-bit application. However, part of the graphics driver runs in user mode (that's something that Vista added; in XP it ran in kernel mode only).
Yep, this confuses me. Even with Physical Address Extensions, it appears that MS won't let you use all your RAM. I have 4GB of RAM and it will only allow me to use 3GB of that. Even though I have PAE enabled. Which puzzles me as PAE is supposed to permit more RAM than that to be addressed.
avatar
Psyringe: Ok, here's some general information.................Feel free to ask further questions. :)
This was amazing, you finally explained something that was always a uniquely difficult concept to grasp... the most important part is the #6 for anyone running a 32bit app in a 64bit OS, which is nearly anyone with a computer less than a year old now. Fantastic explanation!

On a side note why the name change?
Post edited February 03, 2013 by Starkrun
Thanks for posting. I understand what you wrote and greatly appreciate it.

Yes I know and understand about the address space issue.

But the last piece I would like to know is how does a game use the address space it's self?

Does the game's total address space included VRAM in it or not? I am very curious about this in particular because I have notice Oblivion alway seems to crash at ~1GB system RAM usage and I am using a 1GiB card.

Also about Physical address extensions. Does this look right? (see attachment) I have 4GiBs RAM and 1GiB video card.
The RAM reported is sometimes higher like 3.58.
Attachments:
Post edited February 07, 2013 by FreedomWings
avatar
FreedomWings: Thanks for posting. I understand what you wrote and greatly appreciate it.

Yes I know and understand about the address space issue.

But the last piece I would like to know is how does a game use the address space it's self?

Does the game's total address space included VRAM in it or not? I am very curious about this in particular because I have notice Oblivion alway seems to crash at ~1GB system RAM usage and I am using a 1GiB card.

Also about Physical address extensions. Does this look right? (see attachment) I have 4GiBs RAM and 1GiB video card.
The RAM reported is sometimes higher like 3.58.
PAE is pretty worthless on Windows XP, because 32-bit XP won't address more than 4GB RAM even with PAE. The 3.58 GB you see is 4GB less the address space that XP can't use for memory because it's occupied by devices.

The 2GB of address space that a game on 32-bit Windows normally gets to use does not include VRAM. The game's graphics resources, which may be extensive, live in VRAM to the extent that the game is able to keep them there. The 2GB holds things like code, the state of the game in progress, resources that are going to be staged to the graphics card, things like that.

One thing not mentioned in the previous discussion is that applications that are to be Large Address Aware (allowing them to address up to 3GB on 32-bit OS and 4GB on 64-bit) must be well coded so that they are "32-bit clean". Code that commingles addresses and signed integers is the sort of code that breaks that rule. Good programmers shouldn't be writing bad code like that, but sometimes they do anyway.