Live data from Hacker News

Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

superuser.com

41–50 of 64 posts

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#41
post #8
post #6

There is also a very recently developed middle ground, the Linux "x32" ABI, since Linux v3.4: http://en.wikipedia.org/wiki/X32_ABI As I understand it, this mode gains performance by sticking with 32bit pointers in user-space instead of 64bit pointers, while still allowing for taking advantage of all the new registers etc available in x86-64 ("amd64") CPUs. (Many programs doesn't really need more than 4gb virtual addr…

x32 is clearly a good technical solution. If you're running on a 64 bit kernel, x32 is superior to i686 in every measurable way. But it's also yet another architecture. It's not binary compatible with either i686 or x86_64. You need your whole userspace compiled to use it. Middleware with embedded assembly (there's a surprising amount of this in glibc, and of course things like ffmpeg, libjpeg, etc...) needs to be po…

I wonder if there could be an alternative in hardware.

Could the cpu have a mode/flag where all pointers in cpu registers were treated as 32 bits (high 32 bits ignored)?

Alignment issues might make this impossible (loading a 32 bit address in a compatible way from memory/cache...) but it would be neat if it could work. For instance, if memory layout in 32 bit chunks were A... B..., there would have to be a way to load both A and B into the low 32 bits of a register.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#42
post #34
post #29

Holy Baader-Meinhof phenomenon. I ordered 8 GB of RAM for my HP laptop last night and spent well over two hours reading about this exact subject to see if I needed to install Windows 64-bit when it arrives. I think I even stumbled upon this same page. That being said, I still don't fully understand; Once I install the new RAM, will I only receive the benefits if I perform a new 64-bit install of Windows 7, or will up…

You need to install 64-bit Windows to use anything beyond ~3.5GB of RAM.

This is not true. Did you read the answers? 32-bit OSs with PAE support can use all the RAM. Most processes will only be able to use 4GB, but that's per process, not for the whole system.

So AD1066 doesn't need a 64-bit Windows, just any 32-bit Windows newer than XP.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#43

The top answer seems wrong to me. >> a process can have more memory than address space How does that work? The best I can come up with is the author is referring to mmap? In which case the address space is still limited to 4Gb although I concede that with the OS pagefile it would be possible to have more than 4Gb in core at a time via judicious use of mmap.

You need to ask the OS to remap your address space to different area of physical memory. Windows has the Address Windowing Extensions[1], which allow processes to reserve multiple blocks of memory and switch between them.

[1]: http://en.wikipedia.org/wiki/Address_Windowing_Extensions

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#44
post #23

I dual boot Ubuntu 12.04 32-bit and Windows 7 32-bit on my HP laptop, it has 8GB of RAM. When I am running Ubuntu I see 7.8GB (I'm assuming this is 1000 vs 1024 issue and doesn't concern me) in my system settings and resource monitor. When I am running Windows I only see 3.8GB of RAM in resource monitor, but I see the full 8GB if I look in device manager. Can somebody explain this to me?

It has been said here before. Linux fully supports PAE whereas Windows only uses it for execution restriction. Therefore you are not able to see anything beyond the 4 GB limit on Windows.

> Linux fully supports PAE whereas Windows only uses it for execution restriction.

That is not correct. Windows also supports full PAE, but adds licensing-based restrictions. The Datacenter and Enterprise editions of Windows Server 2008 will provide access to all 64GB RAM PAE can provide.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#45
post #27
post #23

I dual boot Ubuntu 12.04 32-bit and Windows 7 32-bit on my HP laptop, it has 8GB of RAM. When I am running Ubuntu I see 7.8GB (I'm assuming this is 1000 vs 1024 issue and doesn't concern me) in my system settings and resource monitor. When I am running Windows I only see 3.8GB of RAM in resource monitor, but I see the full 8GB if I look in device manager. Can somebody explain this to me?

I'm not an expert on these matters, but as I understand it, Windows is not ignorant of the fact that you have 8GB of RAM, it is simply unable to address it. So it makes logical sense that it would show you having 8GB, but only 3.8GB of usable RAM.

That is not correct, Windows is actually fully aware of the physical RAM on the machine and is technically able to use it, but has a license-based restriction scheme only letting a subset of the RAM be used.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#46
post #28
post #23

I dual boot Ubuntu 12.04 32-bit and Windows 7 32-bit on my HP laptop, it has 8GB of RAM. When I am running Ubuntu I see 7.8GB (I'm assuming this is 1000 vs 1024 issue and doesn't concern me) in my system settings and resource monitor. When I am running Windows I only see 3.8GB of RAM in resource monitor, but I see the full 8GB if I look in device manager. Can somebody explain this to me?

Most likely your Ubuntu uses PAE, and Windows does not. NT kernel certainly supports PAE, but likely MS has disabled it in client systems for some reason.

> NT kernel certainly supports PAE, but likely MS has disabled

Nope. They can't actually disable it since the NX bit requires that PAE be enabled.

The limitation comes from licensing and tiering, and is handled in the kernel independently from PAE.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#47
post #39

Most of the responses to the question seem to be "sort of" correct but missing important parts of the overall picture. Further, a complete answer to the question is going to be subject to the operating system the given application is running under as the specifics are going to be heavily dependant on OS implementation. I can't speak for Unix systems, but on the Windows side, it's complicated and messy: PAE (Physical…

> Client editions of Windows do not support PAE while server editions do.

That is not correct, client editions fully support PAE.

> As for why PAE isn't supported on client editions

It is supported (and enabled), the limits are implemented separately and independently.

> this isn't a licensing problem (you can buy x64 editions for the same price that have massively increased RAM limits)

Windows 7 Home Basic x64 will only make 8GB RAM available, Premium will restrict to 16GB, professional and up will allow up to 192GB. Meanwhile Server 2008 R2 Enterprise and Datacenter allow 2TB. These are very much licensing restrictions, as is Windows 7 Starter (x86)'s 2GB limit.

> but rather, Microsoft playing it safe with driver compatibility.

That is the excuse they give for it, yes. It just happens to make no sense when applied to the x64 limits I quoted above, to Starter's 2GB limit (and Vista Starter's even lower 1GB) or to e.g. Windows Server 2008 R2 Foundation's 8GB limit (2008 R2 only runs on x64 and Itanium so 32b isn't even remotely a factor)

> so it's more a hard limit on addressable physical memory

It's not "hard", since it's merely based on the licensing mode of the kernel. It can even be hacked out.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#48
post #37

Earlier quoted context omitted.

Like the exact opposite of flat-real mode. Flat real mode was a hack mode on old 32bit intel systems to enable flat memory mapping with 16bit code. You'd jump into protected mode, map the full 4gig address space flat, then jump back into 16bit real mode without remapping that memory space. Afterwards you could access all your memory in a flat address space rather than using 64K segment:offsets. You had to prefix your…

Interesting comparison :) I'm curious about what you're thinking about when you say "write your own runtime library" - wasn't the whole purpose of this "unreal mode" and staying in 16bit such that you would still have access to DOS and its API? (compared to switching to full 32bit mode, where DOS went out the window unless you implemented or embedded a "DOS-extender"?).

Yes you're correct about purpose, but many of the runtime functions would then be limited to the old 64K limit.

I rewrote all the string handling, memory management, etc functions in the Borland pascal and c++ runtimes to let me use all the memory without worrying about segments/offsets.

So, you got the DOS functions, but you also got printf, port io, memory functions, a bunch of stuff I can't remember, etc.

Basically you got the primary benefits (for the needs of the time) of pmode - flat memory, without most of the pain. Seems like the same situation here - you get all the new registers, but without the pointer overhead.

EDIT: One point to note is that your Code, Data and Heap segments all stayed 64K. This bit me in the ass once when I was presenting. Two bits of code had been tested separately when brought together went over the 64K code and heap limits. That was embarrassing.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#49
post #34

Earlier quoted context omitted.

You need to install 64-bit Windows to use anything beyond ~3.5GB of RAM.

This is not true. Did you read the answers? 32-bit OSs with PAE support can use all the RAM. Most processes will only be able to use 4GB, but that's per process , not for the whole system. So AD1066 doesn't need a 64-bit Windows, just any 32-bit Windows newer than XP.

> So AD1066 doesn't need a 64-bit Windows, just any 32-bit Windows newer than XP.

No. Non-server 32b Windows will never give access to more than 4GB RAM to the user unless you patch the kernel. XP 32b, Vista 32b and 7 32b — including Ultimate for the latter 2 — all restrict "available physical memory" to 4GB in all situations. So do many server editions as well, for Windows Server 2008 x86 for instance, only the Enterprise and Datacenter editions will give access to more than 4GB RAM (up to 64).

A 2008 Enterprise license is ~$1500. I doubt ad1066 has any desire to pay such a price.

Re: Can a 32-bit OS machine use up all 8GB RAM + 20GB page file?

#50
How does one swap memory in and out of address space? I understand this can be done with files via mmap but not sure about RAM, since in that case would you not need to know the physical memory addresses of what you wanted to swap in or out? Isn't this information deliberately hidden from userspace applications?
Post reply on HN