gpt4 book ai didi

windows - 32 位进程能否在 64 位 Windows 操作系统上访问更多内存?

转载 作者:可可西里 更新时间:2023-11-01 12:44:50 25 4
gpt4 key购买 nike

据我了解,在没有/3GB 开关的情况下,32 位进程在 32 位 Windows 上只能访问 2GB 内存,并且操作系统出于其自身的邪恶原因占用了部分内存。这似乎与我的经验相吻合,因为我们有一个应用程序在达到大约 1.2 - 1.5 GB 的 RAM 时崩溃,没有内存异常,即使仍有足够的内存可用。

将此 32 位应用程序移动到 64 位 Windows 是否允许它访问超过 1.5 GB 的内存?应用程序本身是否必须升级到 64 位?

最佳答案

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

最值得注意的是它说:

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-us/library/wz223b1z.aspx

关于windows - 32 位进程能否在 64 位 Windows 操作系统上访问更多内存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/570589/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com