Results 1 to 12 of 12

Thread: Windows - 32-bit vs 64-bit

  1. #1
    Ex-MSFT Paul Adams's Avatar
    Join Date
    Jul 2003
    Location
    %systemroot%
    Posts
    1,926
    Thanks
    29
    Thanked
    77 times in 59 posts
    • Paul Adams's system
      • Motherboard:
      • Asus Maximus VIII
      • CPU:
      • Intel Core i7-6700K
      • Memory:
      • 16GB
      • Storage:
      • 2x250GB SSD / 500GB SSD / 2TB HDD
      • Graphics card(s):
      • nVidia GeForce GTX1080
      • Operating System:
      • Windows 10 x64 Pro
      • Monitor(s):
      • Philips 40" 4K
      • Internet:
      • 500Mbps fiber

    Windows - 32-bit vs 64-bit

    A quick overview of the fundamental differences between 32-bit (x86/IA32) and 64-bit (x64/Intel64) versions of Windows, with a few commonly-asked questions.
    Starting with a refresher on the difference between physical memory and virtual memory...

    PHYSICAL MEMORY
    Maximum physical memory support in Windows depends on the platform and version purchased:

    x86 Platform
    XP Starter Edition - 512MB
    XP * - 4GB
    Server 2003 Standard SP2 - 4GB
    Server 2003 Enterprise SP2 - 64GB
    Vista Starter Edition - 1GB
    Vista * - 4GB

    x64 Platform
    XP Professional - 128GB
    Server 2003 Standard SP2 - 32GB
    Server 2003 Enterprise SP2 - 2TB
    Vista Home Basic - 8GB
    Vista Home Premium - 16GB
    Vista * - 128GB

    Though at present you don't find many home-built machines supporting more than 4GB anyway.

    See: Processor and memory capabilities of Windows XP Professional x64 Edition and of the x64-based versions of Windows Server 2003
    See: Memory Limits for Windows Releases (Windows)


    VIRTUAL MEMORY
    On a 32-bit version of Windows, using default settings, each application can use up to 2GB (2^31 bytes) of virtual memory it can address.

    Of the total virtual address space available to any 32-bit process (4GB = 2^32 bytes), the remaining space is used for the kernel.

    0x00000000 - 0x7FFFFFFF = 0y00000000000000000000000000000000 - 0x01111111111111111111111111111111 = lower 2GB, user-mode
    0x80000000 - 0xFFFFFFFF = 0y10000000000000000000000000000000 - 0x11111111111111111111111111111111 = upper 2GB, kernel-mode

    This is true even for systems with less than 4GB of physical memory installed - we are talking VIRTUAL memory addresses here, and anything that won't fit into physical memory can be put into the page (or "swap") file.

    Comparing the bitmasks, by default it can be determined if a virtual memory address is in user-mode or kernel-mode space by looking at the left-most (most significant) bit:
    0 = User-mode
    1 = Kernel-mode


    If I run 2 very large apps at the same time, could each of them use 2GB of memory?

    Yes, their respective user-mode virtual memory spaces can be 2GB each, which may occupy physical memory.
    Remember we are still talking virtual memory here, so as long as there is disk space and the pagefile has not been modified, it should work on any system.


    How can the 32-bit version of Windows possibly use more than 4GB of physical memory?

    If the BIOS supports "Physical Address Extension" (PAE) and you use the /PAE BOOT.INI switch - the memory pointers are now extended to 36 bits, to provide a possibility of up to 64GB of physical memory to be addressed (2^36).
    As each virtual memory address is now bigger, it takes up more space in the kernel space, so having more memory consumes more memory (albeit a small overhead).
    The 64-bit versions of Windows have no PAE switch as they can natively address way, way, way more than 4GB.

    See: Operating Systems and PAE Support
    See: Physical Address Extension - PAE Memory and Windows
    See: Intel Physical Addressing Extensions (PAE) in Windows 2000


    I have 4GB of physical memory installed, but 32-bit Windows reports only 2.7/3/3.3GB - why?

    The BIOS uses part of the memory address space for hardware, such as PCI devices or shared (graphics) memory - this was never a problem before we moved from measuring RAM in MB to GB, but now we want to use these addresses.
    This is where PAE is also required - the BIOS needs to allow "remapping" of those addresses to above the 4GB barrier, and the OS kernel has to be enabled for PAE.

    If you are using the PAE kernel and Windows still reports less than 4GB, your BIOS does not support memory remapping.

    See: The system memory that is reported in the System Information dialog box in Windows Vista is less than you expect if 4 GB of RAM is installed
    See: Windows Vista or Windows Server 2003 may report less memory than you expect


    What happens if my machine has more than the "maximum supported memory" installed for my version of Windows?

    Windows will boot, but not see the extra memory to be able to use it - e.g. an x86 XP machine with 6GB of physical RAM will use up to 4GB (depending on that PAE thing).


    How can I tell if I have PAE enabled in Windows?

    Right-click on My Computer, click Properties - the system summary will mention "Physical Address Extension".
    Alternatively, use a debugger to look at the module information for "nt" (i.e. "lmvm nt" in windbg.exe):
    - ntoskrnl.exe = uni-processor, non-PAE
    - ntoskrpa.exe = uni-processor, PAE
    - ntkrnlmp.exe = multi-processor, non-PAE
    - ntkrpamp.exe = multi-processor, PAE


    I didn't turn PAE on, but it is reported in my system summary!

    Data Execution Prevention (DEP) requires PAE, and is enabled by default in Windows XP SP2 - only when this is forced to "always off" in BOOT.INI is a non-PAE kernel used.


    Is there a way for a 32-bit application on a 32-bit version of Windows to use more than 2GB of memory?

    /3GB (or /4GT) can be used in BOOT.INI to skew the 4GB virtual memory split into "1 for the kernel, 3 for the process", but this halves some of the system resources available to the kernel so has a system-wide impact.
    It also reduces the maximum amount of physical memory supported to 16GB in all but the DataCenter SP2 edition.

    0x00000000 - 0xBFFFFFFF = 0y00000000000000000000000000000000 - 0x10111111111111111111111111111111 = lower 3GB, user-mode
    0xC0000000 - 0xFFFFFFFF = 0y11000000000000000000000000000000 - 0x11111111111111111111111111111111 = upper 1GB, kernel-mode

    ** THIS ONLY HELPS FOR APPLICATIONS THAT HAVE BEEN COMPILED WITH "/LARGEADDRESSAWARE" **

    Address Windowing Extensions (AWE) is a method by which processes can view a "2GB window" of their (much larger) virtual address space at any given time, but the application has to be coded to use those APIs.

    ** THIS REQUIRES PAE, AND THE VIRTUAL MEMORY FOR THE APPLICATION IS LOCKED IN PHYSICAL MEMORY AT ALL TIMES **

    See: Large memory support is available in Windows Server 2003 and in Windows 2000


    Is the only option on 32-bit to have the kernel virtual size 1GB or 2GB?

    On Windows Server 2003 you can use the switch /USERVA=xxxx (in addition to /3GB) to specify a number (of MB) between 2048 and 3072 which is the size of user-mode addressing space.
    This can be useful if you are running out of 'pool' memory when using /3GB alone, it increases the virtual address space for the kernel which in turn increases the pool sizes.

    See: How to use the /userva switch with the /3GB switch to tune the User-mode space to a value between 2 GB and 3 GB


    Can I use /3GB (/4GT) and /PAE together?

    Yes, but it might not be wise to do so:
    - the first halves the amount of memory available to the kernel, and limits the maximum amount of physical memory to 16GB
    - the second increases the amount of kernel memory used to map physical memory
    So you increase the risk of exhausting system resources.


    Can I run a 32-bit application on 64-bit Windows?

    Yes, so long as the application does not try to load 32-bit DLLs or drivers - these must be native 64-bit versions.
    This is "Windows On Windows" (WOW) - 32-bit code goes through an emulating DLL to allow it to run on 64-bit Windows.
    (On 32-bit Windows there was a similar feature for allowing 16-bit apps to run.)

    Because of the DLL issue, some CD/DVD protection mechanisms fail to load and so games (typically) can refuse to launch, reporting the disc was not found, or the protection mechanism failed the security check.

    Note that there are certain system resources that are "virtualized" for 32-bit processes running on a 64-bit OS, to prevent issues with conflicts between different platform versions of the same software.
    This means requests through APIs for the following will get redirected to another location without their knowledge:
    "Default Progam Files folder" => C:\Program Files (x86)
    %systemroot%\System32 =>%systemroot%\SysWOW64
    HKCR => HKCR\Wow6432Node
    HKCU\SOFTWARE => HKCU\SOFTWARE\Wow6432Node
    HKCU\SOFTWARE\Classes => HKCU\SOFTWARE\Classes\Wow6432Node
    HKLM\SOFTWARE => HKLM\SOFTWARE\Wow6432Node
    HKLM\SOFTWARE\Classes => HKLM\SOFTWARE\Classes\Wow6432Node


    What this can mean on 64-bit versions of Winodws is that 32-bit processes which are hard-coded to read specific paths instead of using APIs could have problems, and 32-bit programs which are "registry cleaners" may find the path "HKLM\SOFTWARE\Wow6432Node" while scanning, and virtualization makes API calls for this path get remapped to "HKLM\SOFTWARE\Wow6432Node\Wow6432Node" which are false.

    Contrary to FUD, the vast majority of 32-bit programs work perfectly fine on 64-bit Windows in my experience.


    If I run a 32-bit application on 64-bit Windows, does it have the 2GB user-mode address limit still?

    Yes, as the program will not be aware that it can address more than 2GB.
    However, if it was compiled with /LARGEADDRESSAWARE then it now can address up to 4GB of virtual address space for user-mode (more than the 3GB possible on 32-bit).


    Can I upgrade my 32-bit version of Windows to 64-bit?

    No - there are way too many differences to make an upgrade viable, and none of the hardware drivers can be used, so a clean install is the only option.
    For the same reasons, you cannot downgrade from 64-bit to 32-bit.


    When using 64-bit Windows
    - there is no "PAE" or "/3GB" as they are now irrelevant
    - pool limitations jump from 256MB/470MB/650MB to 128GB each
    - hardware Data Execution Prevention is enabled (NX or XD support from the processors)
    - the kernel does not allow for modification whilst running ("Kernel Patch Protection" or "PatchGuard" - helps prevent rootkits)
    - all drivers must be signed (prevents modification and provides a method to identify the author of software with bugs)
    - all device drivers, filter drivers and all DLLs must be native 64-bit
    - there is zero support for 16-bit processes (so 16-bit installers are unable to run to install some legacy programs)
    Last edited by Paul Adams; 08-02-2008 at 10:04 AM. Reason: Expanded on PAE & DEP a bit
    ~ I have CDO. It's like OCD except the letters are in alphabetical order, as they should be. ~
    PC: Win10 x64 | Asus Maximus VIII | Core i7-6700K | 16GB DDR3 | 2x250GB SSD | 500GB SSD | 2TB SATA-300 | GeForce GTX1080
    Camera: Canon 60D | Sigma 10-20/4.0-5.6 | Canon 100/2.8 | Tamron 18-270/3.5-6.3

  2. Received thanks from:

    autopilot (30-10-2007),badass (14-10-2007),chrestomanci (10-12-2007),chuckskull (03-11-2007),speardane (14-10-2007)

  3. #2
    Senior Member
    Join Date
    Aug 2005
    Posts
    334
    Thanks
    10
    Thanked
    12 times in 12 posts

    Re: Windows - 32-bit vs 64-bit

    excellent summary - thanks

  4. #3
    Vive le pants! directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • MSI X99A Gaming 7
      • CPU:
      • Intel Core i7 5280k
      • Memory:
      • 32GiB ADATA DDR4
      • Storage:
      • Corsair Neutron XT 960GB
      • Graphics card(s):
      • MSI GTX 980 Gaming 4G Twin Frozr 5
      • PSU:
      • Corsair AX860i
      • Case:
      • NZXT H440
      • Operating System:
      • Ubuntu 17.10, Windows 10
      • Monitor(s):
      • Dell U2713HM
      • Internet:
      • FIOS

    Re: Windows - 32-bit vs 64-bit

    how about a brief note on 16-bit apps (which are relevant for older installshield installers which have a 16-bit stub) or the need to hack on some .msi files with orca due to naive checking for NT 5.1 (where xp x64 is 5.2)

  5. #4
    Registered+
    Join Date
    Aug 2007
    Location
    Manchester
    Posts
    31
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: Windows - 32-bit vs 64-bit

    Thankfully my install of XP 32 bit can still access 3.5GB of my 4GB of RAM

  6. #5
    Resident abit mourner BUFF's Avatar
    Join Date
    Jul 2003
    Location
    Sunny Glasgow
    Posts
    8,067
    Thanks
    7
    Thanked
    181 times in 171 posts

    MSI P55-GD80, i5 750
    abit A-S78H, Phenom 9750,

    My HEXUS.trust abit forums

  7. #6
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,734
    Thanks
    39
    Thanked
    75 times in 56 posts

    Re: Windows - 32-bit vs 64-bit

    Paul, once again showing your value to the forum community. Thank you.
    It is Inevitable.....


  8. #7
    Ex-MSFT Paul Adams's Avatar
    Join Date
    Jul 2003
    Location
    %systemroot%
    Posts
    1,926
    Thanks
    29
    Thanked
    77 times in 59 posts
    • Paul Adams's system
      • Motherboard:
      • Asus Maximus VIII
      • CPU:
      • Intel Core i7-6700K
      • Memory:
      • 16GB
      • Storage:
      • 2x250GB SSD / 500GB SSD / 2TB HDD
      • Graphics card(s):
      • nVidia GeForce GTX1080
      • Operating System:
      • Windows 10 x64 Pro
      • Monitor(s):
      • Philips 40" 4K
      • Internet:
      • 500Mbps fiber

    Re: Windows - 32-bit vs 64-bit

    Updated the original post to mention DEP has PAE as a pre-requisite, so the PAE kernel is used unless DEP is explicitly disabled, even if /PAE is not mentioned in BOOT.INI.
    ~ I have CDO. It's like OCD except the letters are in alphabetical order, as they should be. ~
    PC: Win10 x64 | Asus Maximus VIII | Core i7-6700K | 16GB DDR3 | 2x250GB SSD | 500GB SSD | 2TB SATA-300 | GeForce GTX1080
    Camera: Canon 60D | Sigma 10-20/4.0-5.6 | Canon 100/2.8 | Tamron 18-270/3.5-6.3

  9. #8
    Registered User
    Join Date
    Mar 2011
    Posts
    2
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: Windows - 32-bit vs 64-bit

    This is a great post however I started thinking about one thing and I am not sure I know the answer. So I have 32-bit WinXP Prof. It means the limit for both physical and virtual memory is 4GB. And I have 4GB of physical RAM. Does it mean that I can safely turn off the pagefile because my OS is not able to handle more than 4GB of virtual memory, so if it swaps some data to the pagefile, it cannot use the physical memory that was freed. Am I correct?

  10. #9
    Now with added Ruffus Dog Tattysnuc's Avatar
    Join Date
    Feb 2006
    Location
    Liverpool
    Posts
    1,347
    Thanks
    283
    Thanked
    206 times in 132 posts
    • Tattysnuc's system
      • Motherboard:
      • Asus Rampage IV Extreme
      • CPU:
      • Core i7 4690X @ stock
      • Memory:
      • 32Gb Assorted Corsair
      • Storage:
      • Sandisk Extreme 480Gb SSD
      • Graphics card(s):
      • eVGA Classified Hydros in SLI
      • PSU:
      • eVGA 1250W
      • Case:
      • Phobya Big Case
      • Operating System:
      • Win 10 Pro
      • Monitor(s):
      • Dell 3007WFP
      • Internet:
      • Virgin 30Mb

    Re: Windows - 32-bit vs 64-bit

    Necrothread!

    What has turning off your page file got to do with freeing up memory? My understanding is that the page file is used in most memory intensive operations as a swap area to optimise the amount of ram available.

    Once you have loaded windows and the corresponding drivers, the amount of RAM available to you will be 3-3.5 Gb typically. Turning off your page file will simply limit you to that memory. In my brief experience with turning on and off page files, some programs actually hard code using the page file, so disabling causes instability.

    Photoshop DEFINITELY does this.
    Join the HEXUS Folding @ home team

  11. #10
    jim
    jim is offline
    HEXUS.clueless jim's Avatar
    Join Date
    Sep 2008
    Location
    Location: Location:
    Posts
    11,344
    Thanks
    605
    Thanked
    1,586 times in 1,262 posts
    • jim's system
      • Motherboard:
      • Asus Maximus IV Gene-Z
      • CPU:
      • i5 2500K @ 4.5GHz
      • Memory:
      • 8GB Corsair Vengeance LP
      • Storage:
      • 1TB Sandisk SSD
      • Graphics card(s):
      • ASUS GTX 970
      • PSU:
      • Corsair AX650
      • Case:
      • Silverstone Fortress FT03
      • Operating System:
      • 8.1 Pro
      • Monitor(s):
      • Dell S2716DG
      • Internet:
      • 10 Mbps ADSL

    Re: Windows - 32-bit vs 64-bit

    Quote Originally Posted by rabb99 View Post
    This is a great post however I started thinking about one thing and I am not sure I know the answer. So I have 32-bit WinXP Prof. It means the limit for both physical and virtual memory is 4GB. And I have 4GB of physical RAM. Does it mean that I can safely turn off the pagefile because my OS is not able to handle more than 4GB of virtual memory, so if it swaps some data to the pagefile, it cannot use the physical memory that was freed. Am I correct?
    It's a complete waste of time.

  12. #11
    Registered User
    Join Date
    Mar 2011
    Posts
    2
    Thanks
    0
    Thanked
    0 times in 0 posts

    Re: Windows - 32-bit vs 64-bit

    Quote Originally Posted by snootyjim View Post
    It's a complete waste of time.
    What is a complete waste of time? Using pagefile when having 4GB of RAM, or turning it off? Could you also add reasons why, please.

  13. #12
    jim
    jim is offline
    HEXUS.clueless jim's Avatar
    Join Date
    Sep 2008
    Location
    Location: Location:
    Posts
    11,344
    Thanks
    605
    Thanked
    1,586 times in 1,262 posts
    • jim's system
      • Motherboard:
      • Asus Maximus IV Gene-Z
      • CPU:
      • i5 2500K @ 4.5GHz
      • Memory:
      • 8GB Corsair Vengeance LP
      • Storage:
      • 1TB Sandisk SSD
      • Graphics card(s):
      • ASUS GTX 970
      • PSU:
      • Corsair AX650
      • Case:
      • Silverstone Fortress FT03
      • Operating System:
      • 8.1 Pro
      • Monitor(s):
      • Dell S2716DG
      • Internet:
      • 10 Mbps ADSL

    Re: Windows - 32-bit vs 64-bit

    Quote Originally Posted by rabb99 View Post
    What is a complete waste of time? Using pagefile when having 4GB of RAM, or turning it off? Could you also add reasons why, please.
    Turning it off is a complete waste of time. It won't give you any noticeable performance benefits, the only likely result is that your PC will crash if it requires a pagefile that is unavailable.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 63
    Last Post: 14-11-2011, 09:17 AM
  2. Windows - a brief guide inside
    By Paul Adams in forum Software
    Replies: 31
    Last Post: 23-06-2007, 03:14 PM
  3. Windows Vista retail doomed unless Microsoft cuts prices?
    By Bob Crabtree in forum HEXUS News
    Replies: 132
    Last Post: 02-04-2007, 01:05 PM
  4. Windows - how to use it more securely
    By Paul Adams in forum Software
    Replies: 12
    Last Post: 07-02-2006, 04:18 PM
  5. Have you done all of your windows updates ?
    By Moby-Dick in forum General Discussion
    Replies: 33
    Last Post: 05-05-2004, 01:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •