64-bit Windows, an advantage also for 32-bit applications
The easiest way to take advantage of a 64-bit OS is of course running existing – 32-bit – applications on the new platform. In earlier blogs I mentioned how easy it is and that even 32-bit application take advantage of the underlying 64-bit operating system. How? The 64-bit OS has way more headroom and resources at hand to support applications. And it does not matter if it is a 32-bit or a 64-bit application. Below table gives an overview of some of the internal data structures, buffers and tables and how they look like on a 64-bit system.
Architectural Component |
Windows 32-bit |
Windows 64-bit |
Virtual memory |
4 gigabytes (GB) |
16 terabytes |
Paging file size |
64 GB |
512 terabytes |
Paged pool |
470 megabytes (MB) |
128 GB |
Non-paged pool |
256 MB |
128 GB |
System cache |
1 GB |
1 terabytes |
System Page Table Entry (PTE) |
1.2GB |
128GB |
It is pretty obvious that with these vast resources available the OS can perform better, especially under heavy load from many concurrently running apps (32-bit and 64-bit). Of course only if you have installed the enough memory J.
Another cool story for 32-bit apps on 64-bit Windows is a flag in the executable’s exe file header. Under 32-bit Windows a program has access to up to 3 GB of memory (assuming the /3GB switch is used in the boot.ini file). For the same app, running on a 64-bit Windows up to 4 GB of RAM are immediately available if this flag is set. /LARGEADDRESSAWARE is the flags and does the magic. The Platform SDK and other development tools form Microsoft ship with a program called editbin. Editbin executed against the 32-bit executable file with the /LARGEADDRESSAWARE flag enables the 32-bit application to use up to 4 GB on 64-bit Windows.
You can try this “at home”. Write yourself a simple app that malloc’s as much memory as possible and display the amount of allocated memory. Run it with and without the flag set. Amazing.
References: