无需重新编译即可分配更多 RAM
Allocate more RAM without re-compiling
我有一个旧的 32 位 Windows XP 应用程序,它只能在我的 64 位 Windows 10 系统上分配 2GB 内存。由于此应用程序在存储大量数据时尝试使用超过 2GB 的 RAM,因此我遇到了这样的内存不足异常:
Out of memory
8 addresses:
(unknown)(0): Worldbuilder.exe+825384 (unknown)
(unknown)(0): Worldbuilder.exe+798965 (unknown)
(unknown)(0): Worldbuilder.exe+793330 (unknown)
(unknown)(0): Worldbuilder.exe+793277 (unknown)
(unknown)(0): Worldbuilder.exe+799637 (unknown)
(unknown)(0): Worldbuilder.exe+666356 (unknown)
(unknown)(0): Worldbuilder.exe+664774 (unknown)
(unknown)(0): Worldbuilder.exe+723505 (unknown)
Because of the severity of this error the game will now exit.
Note: The source code of the application is not available.
我还看到一些工具可以通过允许应用程序分配多达 4GB 的 RAM 而无需 重新编译应用程序来解决此问题,例如 Large Address Aware .
我现在的问题是:
这些工具如何实现这一目标。
Note: I'm using Windows 10 64bit with the programming languages C++/C. I also do not have any code yet as I do not even know how this works in theory.
它在可执行文件的 Win32PE header 中设置 large-address-aware 标志。这通常设置在 link 时间。如果应用程序使用带符号的 32 位值对这些分配进行索引,则它实际上可能无法处理大于 2G 的内存分配。
我有一个旧的 32 位 Windows XP 应用程序,它只能在我的 64 位 Windows 10 系统上分配 2GB 内存。由于此应用程序在存储大量数据时尝试使用超过 2GB 的 RAM,因此我遇到了这样的内存不足异常:
Out of memory 8 addresses: (unknown)(0): Worldbuilder.exe+825384 (unknown) (unknown)(0): Worldbuilder.exe+798965 (unknown) (unknown)(0): Worldbuilder.exe+793330 (unknown) (unknown)(0): Worldbuilder.exe+793277 (unknown) (unknown)(0): Worldbuilder.exe+799637 (unknown) (unknown)(0): Worldbuilder.exe+666356 (unknown) (unknown)(0): Worldbuilder.exe+664774 (unknown) (unknown)(0): Worldbuilder.exe+723505 (unknown) Because of the severity of this error the game will now exit.
Note: The source code of the application is not available.
我还看到一些工具可以通过允许应用程序分配多达 4GB 的 RAM 而无需 重新编译应用程序来解决此问题,例如 Large Address Aware .
我现在的问题是: 这些工具如何实现这一目标。
Note: I'm using Windows 10 64bit with the programming languages C++/C. I also do not have any code yet as I do not even know how this works in theory.
它在可执行文件的 Win32PE header 中设置 large-address-aware 标志。这通常设置在 link 时间。如果应用程序使用带符号的 32 位值对这些分配进行索引,则它实际上可能无法处理大于 2G 的内存分配。