Thursday, February 10, 2011

Memory limitations for Delphi 7

Application developed under Delphi 7 are 32 bit, and they can only access a limited amount of RAM. 
This Microsoft document says that the limit is 2GB.
So I have made some tests and indeed I could not allocate more than 2GB of RAM. However, The document also says that 32bit applications could access up to 3GB of RAM if the following conditions are met:
  • The OS uses the /3GB switch
  • The application has the IMAGE_FILE_LARGE_ADDRESS_AWARE flag set.
Here is the official documentation for /3GB switch.
There is a possible draw back when using the /3GB flag: the OS is squeezed in to 1GB of RAM, instead of 2GB. In some situations this might not be enough. However, I thin this is unlikely. 1GB should be enough for OS.





Related article: How difficult is to write a solid software protection (licensing) scheme?


 

No comments:

Post a Comment