32 位进程可以在 64 位 Windows 操作系统上访问更多内存吗? [英] Can a 32bit process access more memory on a 64bit windows OS?

查看:40
本文介绍了32 位进程可以在 64 位 Windows 操作系统上访问更多内存吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,32 位进程在没有/3GB 开关的情况下只能访问 32 位 Windows 上的 2 GB 内存,并且由于其自身的恶魔原因,其中一些内存被操作系统占用.这似乎符合我的经验,因为我们有一个应用程序在达到大约 1.2 - 1.5 GB 的 RAM 时崩溃,没有内存异常,即使仍有足够的可用内存.

From what I understand, a 32-bit process can only access 2 GB of memory on 32-bit Windows without the /3GB switch, and that some of that memory is taken up by the OS for its own diabolical reasons. This seems to mesh with my experience as we have an app that crashes when it reaches around 1.2 - 1.5 GB of RAM without memory exceptions, even though there is still plenty of memory available.

是否将这个 32 位应用程序移至 64 位 Windows 允许它现在可以访问超过 1.5 GB?应用程序本身是否必须升级到 64 位?

Would moving this 32-bit application to 64-bit Windows allowing it accesses more than 1.5 GB it can now? Would the application itself have to be upgraded to 64-bit?

推荐答案

较新版本的 Visual Studio 有一个新标志,可让 32 位应用程序识别大地址空间".基本上它的作用是说,如果它加载到 64 位版本的 Windows 上,那么它将获得 4GB(32 位指针的限制).这肯定比您在 32 位版本的 Windows 上获得的 2 或 3 GB 更好.请参阅 http://msdn.microsoft.com/en-us/library/aa366778.aspx:

Newer versions of Visual Studio have a new flag which make 32-bit apps "big address space aware". Basically what it does is say that if it's loaded on a 64-bit version of windows, then it will get 4GB (the limit of 32-bit pointers). This is certainly better than the 2 or 3 GB you get on 32-bit versions of windows. See http://msdn.microsoft.com/en-us/library/aa366778.aspx:

最值得注意的是:

内存和地址空间的限制因平台、操作系统、以及是否IMAGE_FILE_LARGE_ADDRESS_AWARE 值LOADED_IMAGE 结构和正在使用 4 GB 调整 (4GT).IMAGE_FILE_LARGE_ADDRESS_AWARE 已设置或使用清除/LARGEADDRESSAWARE 链接器选项.

Limits on memory and address space vary by platform, operating system, and by whether the IMAGE_FILE_LARGE_ADDRESS_AWARE value of the LOADED_IMAGE structure and 4-gigabyte tuning (4GT) are in use. IMAGE_FILE_LARGE_ADDRESS_AWARE is set or cleared by using the /LARGEADDRESSAWARE linker option.

另见:http://msdn.microsoft.com/en-我们/图书馆/wz223b1z.aspx

这篇关于32 位进程可以在 64 位 Windows 操作系统上访问更多内存吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆