简单的问题:x86 应用程序可以利用 x64 操作系统提供的额外 RAM 吗?
我希望有一点知识的人能够澄清这一点。关于运行 64 位操作系统(例如 Windows 7 x64)的原因有很多讨论,但许多人似乎认为他们的旧 x86 应用程序将能够利用任何大于 3.5GB 的 RAM。
不过,据我了解,x86 应用程序无法寻址那么高的内存......除非它们经过专门编程(很少有人会拥有)。
有知识的人可以一劳永逸地为我解决这个问题吗? 32 位应用程序可以利用运行 8GB RAM 的系统吗?
例如,如果用户决定(无论出于何种原因)同时运行多个 x86 应用程序,尽可能填充 RAM,是否会使用 Windows 7 x64 中可用的额外可寻址内存?
谢谢!
I hope someone with a bit of knowledge can clear this up. There's many discussions about the reasons to run a 64-bit OS (e.g. Windows 7 x64), but many people seem to think that their old x86 apps will be able to take advantage of any RAM greater than 3.5GB.
As I understand it, though, x86 apps cannot address memory that high... unless they've been specifically programmed to (which very few will have).
Can someone knowledgeable clear this up for me, once and for all? Can 32-bit apps take advantage of a system running 8GB of RAM?
E.g. If a user decided (for whatever reason) to run several x86 apps at once, filling the RAM as much as possible, would the extra addressable memory available in Windows 7 x64 be used?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在 64 位系统上,32 位应用程序能够使用完整的 4GB 虚拟地址空间,减去大约 64K。默认的 32 位 Windows 系统只允许 32 位进程使用 2 GB 的虚拟地址空间。通过专门配置操作系统,可以将该限制提高到 3 GB,但它仍然不如 64 位版本的 Windows 上的那么好。
如果您有 8GB 内存,则该 8GB 可以在多个 32 位进程之间分配,并且在必要时将利用整个 8GB。但是,不会为单个 32 位进程分配超过 4 GB 的内存。
On a 64 bit system, 32 bit applications are able to use the full 4GB virtual address space, minus about 64K. A default 32 bit windows system will only allow a 32 bit process to use 2 GB of virtual address space. By specially configuring the OS it's possible to push that limit up to 3 GB, but it's still not as good as what you would get on a 64 bit version of windows.
If you have 8GB of ram, that 8 GB can be divided up between multiple 32 bit processes, and the entire 8 GB will be utilized if necessary. However, no single 32 bit process will be allocated more than 4 GB of memory.
虽然我没有可引用的来源,但据我所知:32 位应用程序本身无法寻址超过 4GB 的内存,除非它使用一些技巧(这是非常不可能的),但如果你有一些 32 位应用程序正在运行同时,它们每个都可以有 4GB,因此两个 32 位应用程序应该能够使用全部 8GB 内存。虽然我不是100%确定。
Although i don't have sources to cite, but from my knowledge: 32bit app will not be able to address more than 4GB of memory itself, unless it uses some tricks(that is very unlikely), but if you have some 32bit apps running at the same time, they can all have 4GB each, and thus two 32bit apps should be able to use all 8GB of memory. Though I'm not 100% sure.
是的。如果没有特殊技巧,x86 应用程序不能一次使用超过 2GB 的内存,但它们可以使用任何可用的内存。
Yes. x86 apps cannot use more than 2GB of memory at once without special tricks, but they can use any memory available.
添加到其他(正确的)答案:
以下是一些供进一步阅读的文章:
Windows x64 – 相同但又截然不同,第 1 部分:虚拟内存
Windows x64 – 完全相同但又截然不同,第 2 部分:内核内存、/3GB、PTE、(非)分页池
x64?我的终端服务器在 32 位和 8/12/16 GB RAM 下运行得很好!
Adding to the other (correct) answers:
Here are some articles for further reading:
Windows x64 – All the Same Yet Very Different, Part 1: Virtual Memory
Windows x64 – All the Same Yet Very Different, Part 2: Kernel Memory, /3GB, PTEs, (Non-) Paged Pool
x64? My Terminal Servers Run Just Fine With 32 Bits and 8/12/16 GB RAM!
答案是肯定的。这是虚拟地址空间给我们带来的好处之一——每个进程(对于进程而言)能够看起来就像在从 0 开始并从那里向上的线性地址空间中执行一样。
就每个 32 位应用程序而言,它都有自己的 0 到 2 GB 的地址空间(无需特殊技巧)。操作系统处理虚拟地址到物理地址的转换。
The answer is yes. That's one of the benefits a virtual address space gives us--the ability for each process to appear (to the process) as though it's executing in a linear address space that starts at 0 and goes up from there.
As far as each of the 32-bit applications is concerned, it has its own address space from 0 to 2 gigabytes (without special tricks). The operating system handles the virtual-to-physical address translation.