What are the side effects of using IMAGE_FILE_LARGE_ADDRESS_AWARE flag (to use more than 2GB of RAM) in my program开发者_StackOverflow中文版?
I am using Delphi 7 with FastMM4.
You need to make sure you don't use the built-in memory manager and use something that can support addresses >2GB. e.g. FastMM.
You may have other code, typically 3rd party code, in your codebase that will fall foul of addresses >2GB. I personally deal with this by running under 64 bit Windows and forcing the system to use top-down memory allocation via a registry setting.
When you do this you may run into some bugs in Windows. For example GetCursorPos on Vista fails when the address of its parameter is >2GB. I work around that by patching Windows.GetCursorPos with a version that goes through GetCursorInfo. This bug is fixed in Windows 7 but MS elected not to back-port it to Vista.
I can't stress enough how important it is to run with top-down memory allocation enabled.
精彩评论