gpt4 book ai didi

delphi - 如何使我的 32 位 Delphi 应用程序能够在 64 位 Windows 上使用 4GB 内存(通过 Wow64.exe)?

转载 作者:行者123 更新时间:2023-12-03 14:38:01 29 4
gpt4 key购买 nike

根据这个MSDN page :

WOW64 enables 32-bit applications to take advantage of the 64-bit kernel. Therefore, 32-bit applications can use a larger number of kernel handles and window handles. However, 32-bit applications may not be able to create as many threads under WOW64 as they can when running natively on x86-based systems because WOW64 allocates an additional 64-bit stack (usually 512 KB) for each thread. In addition, some amount of address space is reserved for WOW64 itself and the data structures it uses. The amount reserved depends on the processor; more is reserved on the Intel Itanium than on the x64 processor.

If the application has the IMAGE_FILE_LARGE_ADDRESS_AWARE flag set in the image header, each 32-bit application receives 4 GB of virtual address space in the WOW64 environment. If the IMAGE_FILE_LARGE_ADDRESS_AWARE flag is not set, each 32-bit application receives 2 GB of virtual address space in the WOW64 environment.

如何在 Delphi 2007 应用程序中有效地设置 IMAGE_FILE_LARGE_ADDRESS_AWARE 标志,以便使我的 32 位应用程序 Wow64感知 并寻址到完整的 4GB 内存?

最佳答案

请参阅这篇 CodeCentral 文章:Using more than 3 GB memory in a 32 bit Delphi program .

在现代 Delphi 版本中,只需将编译器指令添加到 dpr:{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}

关于delphi - 如何使我的 32 位 Delphi 应用程序能够在 64 位 Windows 上使用 4GB 内存(通过 Wow64.exe)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1849344/

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