Slashdot Mirror


Behind the 4GB Memory Limit In 32-Bit Windows

An anonymous reader points us to a very detailed post by Geoff Chappell, first put up early this year, explaining how the 4GB memory limit commonly bandied about for 32-bit Windows (he is writing mainly about Vista) is more of a licensing preference than an architectural limit. The article outlines how Chappell unlocked his system to use all the memory that is present, but cautions that such hackery is ill-advised for several reasons, including legal ones. "If you want [to be able to use more than 4GB in Vista] without contrivance, then pester Microsoft for an upgrade of the license data or at least for a credible, detailed reasoning of its policy for licensing your use of your computer's memory. ... [C]onsider Windows Server 2008. For the loader and kernel in Windows Vista SP1 (and, by the way, for the overwhelming majority of all executables), the corresponding executable in Windows Server 2008 is exactly the same, byte for byte. Yet Microsoft sells 32-bit Windows Server 2008 for use with as much as 64GB of memory. Does Microsoft really mean to say that when it re-badges these same executables as Windows Vista SP1, they suddenly acquire an architectural limit of 4GB? Or is it that a driver for Windows Server 2008 is safe for using with memory above 4GB as long as you don't let it interact with the identical executables from Windows Vista SP1?"

13 of 756 comments (clear)

  1. Re:Wa wa what? by Annymouse+Cowherd · · Score: 5, Informative
  2. Simple by TheRealMindChild · · Score: 5, Informative

    Does Microsoft really mean to say that when it re-badges these same executables as Windows Vista SP1, they suddenly acquire an architectural limit of 4GB? Or is it that a driver for Windows Server 2008 is safe for using with memory above 4GB as long as you don't let it interact with the identical executables from Windows Vista SP1?

    Windows Server 2008 drivers have to be signed. For them to get signed, they can't do stupid shit like assume they are loaded in the memory space between 3GB->4GB, I'd imagine.

    --

    "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
  3. Re:Wa wa what? by Binestar · · Score: 4, Informative

    Price is the same. In fact, you can barrow someone's 64 bit disk and use your 32 bit license key to to install 64 bit Vista. It is on the front page because it is quite interesting.

    I have a feeling he hit it on the head when he mentioned third party drivers as being a possible reason for the limit.

    --
    Do you Gentoo!?
  4. Word for the wise by Anonymous Coward · · Score: 5, Informative

    On a 32-bit system a single process will always be limited to 4 GB due to the number of address bits, unless the programmer goes through hoops to access a larger memory area one small piece at a time (tricks like that were common in the DOS era -- anyone remember EMS?). On Windows the kernel typically reserves one half of the address space, cutting the usable memory of a single process down to 2 GB. Thus you won't get much advantage from a 64 GB capable kernel unless you run multiple programs that all require 1-2 GB of memory. Come to think of it, such usage is most likely on a server.

    1. Re:Word for the wise by Chris+Burke · · Score: 4, Informative

      Then get a 64-bit OS and be happy.

      PAE is a hack. Even if your copy of windows supports it, it still sucks. It doesn't actually grant the ability to access all 64GB at the same time, it only lets you access it in 4GB windows, so your app has to jump through a lot of hoops to be able to actually use that memory. It was a decent solution for having large databases in the 32-bit era, and that was rightly the only place it should be used. Today, 64 bit cpus are completely mainstream and vastly superior for handling large amounts of data.

      Frankly, in the era of 64-bit budget computers, I think calling the 4GB limit "architectural" is as fair as saying the 286 had a 1MB limit after the introduction of the 386. Technically not completely accurate, but for most nearly all practical purposes it drives the listener in the right direction, which is getting the product which doesn't have the restriction in any way.

      --

      The enemies of Democracy are
    2. Re:Word for the wise by Sandbags · · Score: 4, Informative

      Yea, but even if you enable 16GB of RAM under 32bit Windows, XP and Vista can only give 2GB of it to photoshop, MAX. No SINGLE application can utilize more than 4GB of virtual address space under PAE, had half the address space is reserved for the lernel. PAE however is disabl;ed under 32bit OS as it has risks, especially for lots of drivers, and letting general users have access to this, without a process for validating and supporting all their apps under it (which most companies do not have programmers who understand this type of addressing), would be a support nightmare. PAE works when lots of individual apps need to run concurrently, or when multiple instances of the same app need to run under seperated memory spaces. Both these cases are uncommon for workstation users, and the 64 bit edition solves this issue for most users who would take advantage of it, so PAE is not included in workstation OS by Microsoft. This is NOT a licencing issue, or even a "charge more for advanced features" issue, it;s about who needs it, how much it costs to support it, and whether or not the SHOULD be using it vs other options...

      Its possible for an application under 32bit windows to also take advantage of AWE (Address Windowing Extension). This requires the lock Pages in Memory privilidge for the app, and some pretty extensive code level support. This can allow a 32 bit app to use more than 4GB of RAM under 32bit. It is not very efficient. It;s also one of the API's you're paying extra for under the server licnece that you do not get under the workstation license (XP can't do this, Server 2003 can). Typically this is reserved for apps with massive datasets (DBs over 2GB, large video files, massive images, etc) in situations where the code can not be easily ported to 64bit but where support for AWE can be added.

      --
      There is no contest in life for which the unprepared have the advantage.
  5. Re:Wa wa what? by Icegryphon · · Score: 4, Informative

    yes, PAE has been around forever infact you can enable it in Windows 32bit versions,
    But it wont do you a lick of good in MS windows, except for a very few version of windows.
    http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx

  6. PAE? Nothing to see... by Sits · · Score: 5, Informative

    This sounds like more PAE shenanigans. Using PAE on 32 bit Windows has already been well covered by The Old New Thing.

  7. Re:Wa wa what? by Lemming+Mark · · Score: 5, Informative

    So is that the reason that Linux has the same limit?

    Unless I'm misunderstanding you and the summary (not RTFAed yet - I know, I'm bad) Linux doesn't necessarily have the same limitation. The summary seems to imply that only 4GB of *physical* memory are being supported on 32-bit systems by some versions of Windows. All OSes running on 32-bit x86 are restricted to a 4GB virtual address space, therefore neither Linux nor Windows can offer more than 4GB of directly addressable memory *per process*. But many 32-bit x86 CPUs can address more than 4GB of physical memory using PAE mode.

    The base requirement for using PAE is that the OS supports it - Windows can use it, Linux can too. PAE gets you the ability to address physical memory addresses over 4GB but only if the motherboard has enough address lines to actually relay these requests to the memory. Even if you can't / don't have more than 4GB of RAM installed, it may still be worth it because PAE also lets you use NX (no execute) on 32-bit. PAE on 32-bit doesn't make the process address space any larger, so any given process is still limited to 32-bit pointers.

    32-bit Linux has to be compiled with or without PAE support, so your distro should make sure it installs a the right kernel version to correctly support your hardware. Some OSes (e.g. Solaris) can switch between PAE and non-PAE at boot time, so they only need one kernel image to support both modes. I don't know how Windows handles this.

    A further benefit of PAE, that I've left till last because it's really somewhat gross: the memory mapped IO regions used by PCI devices also take up part of your physical address space. This can result in a "memory hole" where your *real* RAM is overshadowed by an area of memory-mapped IO regions - the real RAM is there but you can't access it. As a result, if you put 4GB of RAM in your system and use a non-PAE kernel (only 4GB of physical address space) then you are *guaranteed* not to be able to use all that RAM because you will *definitely* have hidden some of it "behind" the memory mapped IO regions. If you use PAE mode, the motherboard can potentially remap that "hidden" RAM to a higher physical address, so that you can use it. Not all motherboards support this remapping, even if they *do* support 4GB worth of DIMMs - which is rubbish because they're claiming to support memory that the hardware will never let you actually address. It pays to be wary of this kind of craziness - my mobo has this limitation, which I discovered after buying 4GB of DIMMs (so I stuck one in another PC, which kept me happy in the end).

    Uh, sorry to the parent poster, I've rambled a bit off the point I was originally making and probably just told you a load of stuff you already knew!

  8. Re: Let's just get over this and move to 64bit by Black+Parrot · · Score: 4, Informative

    Seriously, there are no real technical reasons why we can't just run 64bit operating systems. Let's just stop selling 32bit ones.

    Good idea.

    Unfortunately, lots of Windows software won't run on 64-bit Windows XP. Even Windows Update tells you you have to close the 64-bit WIE so it can run the 32-bit version to fetch the update... how lame. Then half the updates won't install, for reasons that aren't made clear.

    It should be clear by now that Microsoft, like every other corporation on the planet, isn't going to do a damn thing unless their share prices depend on it. When there's overwhelming consumer demand for 64-bit computing, they'll start fixing their consumer software to support it.

    --
    Sheesh, evil *and* a jerk. -- Jade
  9. Re:Let's just get over this and move to 64bit by nurd68 · · Score: 4, Informative

    Minor technical reason:

    64 bit OS's don't run on 32 bit CPUs, which is most of the netbook lines. While there are a few Atom models which are 64 bit, the majority of them are 32 bit. I don't think MS wants to abandon that market to Linux, since it would allow netbooks to become a Linux "gateway drug".

  10. Re:Wa wa what? by hairyfeet · · Score: 4, Informative

    Tell that to my cheap ass capture card, that is a good 4x more flaky now that I have PAE enabled. Since I have no intention of getting rid of my nice gobs o' RAM, and I haven't had time to find a card with XP X64 drivers for under $80(If anybody knows of one it would be appreciated) I have just learned to deal with it. For example it will crash more when switching channels in the 25-35 cable range, which is naturally where 3 of my favorite channels are. i have tested it by comparing side by side with my buddies card (we bought ours together on a "buy two and save!" sale) and his you can flip through that range til hell freezes over with no crashes, but he only has 2Gb.

    So you can scream FUD all you want, I have seen it with my very own peepers. Now imagine how many millions of devices there are out there with WinXP 32bit drivers. Everything from funky USB stuff to the truly weird ass shit (like that cassette deck I saw a couple of years back) and then figure how much MSFT would have to pay for the "My shit don't work! Fix it!" calls.

    It is cheaper in the long run just to make the switch to x64 than it is trying to make a hack work, especially a bad hack like over 4Gb support in an OS released in 2001, when 128Mb of RAM was a common configuration. If you are foaming at the mouth and truly need to hate MSFT for something, hate them for this...XP was NEVER supposed to last this long. Longhorn was supposed to be out in 2K3, and because they decided to start over with the Longhorn reset, that of course ended in the clusterfuck that is Vista, you have an OS pushing the decade mark still in widespread use. XP32 just wasn't built to handle gobs of RAM, and trying to force it down is like trying to drop a Mac truck engine in a Pinto. It is just more of a PITA than it is worth.

    --
    ACs don't waste your time replying, your posts are never seen by me.
  11. Re:Wa wa what? by mathew7 · · Score: 4, Informative

    WRONG!! WRONG!! WRONG!!
    You are confusing virtual (app) memory and physical memory.
    Virtual memory is ALWAYS limited to 4GB (with 2/2GB or 3/1GB split of user/kernel) on 32-bit, PAE or not, Workstation or Server.
    PAE allows for more than 4GB PHYSICAL memory. That means you could have 2 3GB apps running all in RAM (no swap) in 6+GB RAM.
    For ONE app to use more than 4GB, you NEED 64-bit.
    Each application page (usually 4K) is mapped to physical space, whether it's RAM or swap (when idle of course). The PAE allows you to map a page on more than 4GB RAM. This is done entirely by OS.
    The problem is that drivers need to know the physical address, because that is what HW devices can access. Some drivers are poorly implemented and fail to do this (like giving a 32-bit address when they sould give 36-bit to the HW).
    For a server, the company usually has an IT department that can get certified HW (not off-the-shelf cheap HW) and they usually test the server before deploying. So any driver issue can be corrected (either change the HW or resolve the driver issue) before deployment.
    So MS did not want to get calls of data corruption and limited PAE on client windows. My problem (and the article's author's) is that WE (tech-savy computer users) cannot activate it afterwards.
    PS: PAE was implemented since Pentium Pro. As I recall it already had 36-lines for adresses (that is 64GB memory space).