What are the side effects of using IMAGE_FILE_LARGE_ADDRESS_AWARE flag (to use more than 2GB of RAM) in my program?
I am using Delphi 7 with FastMM4.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.