Can Delphi XE2 / 64bit target address e.g. 1 terabyte of memory?

454 views Asked by At

Can Delphi / FastMM can address the same as the specifications for the OS? http://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx

I just had a customer ask me if my software could access one terabyte (Windows 2008 server) which got me wondering.

1

There are 1 answers

0
David Heffernan On BEST ANSWER

Delphi emits code with 64 bit pointers. Such pointers are capable of addressing 264 bytes, that is more than 1TB. Any limits are imposed by the operating system's virtual memory design and/or licensing and the Delphi compiler knows nothing of such limits. At runtime the system enforces memory limits and your code will be subject to those limits. But Delphi itself has no addressing limitations.

Likewise, FastMM has no concept of the 1TB limit. FastMM will report out of memory errors when the system reports that memory has been exhausted.

Can Delphi / FastMM can address the same as the specifications for the OS?

Yes.


An aside. Older 32 bit Delphi versions that used the Borland memory manager were not compatible with addresses in the 2GB-4GB range. This problem manifested if such Delphi code executed in a process marked as large address aware.

I'm mentioning this to illustrate how it could be that your development tool places limits on you over and above those of the operating system. Now, there are no such problems with 64 bit Delphi but the question that you ask is quite valid.