ron
ron

Reputation: 5279

Memory error with Delphi 5 on 64 bit

I wrote a program in Delphi 5 whcih runs ok on my Windows 8 32 bit pc. I find that running it on my Windows 7 64bit laptop eventually causes a reallocmem error which does not happen on the 32 bit pc. I inserted the following

MS.dwLength := SizeOf(MemoryStatus);
GlobalMemoryStatus(MS);

On the 32bit pc the size never changes but on the the 64bit laptop it fluctuates but over time gets smaller. Is there some general mechanism in running 32bit Delphi 5 on a 64bit machine that makes this likely?

Upvotes: 1

Views: 432

Answers (1)

David Heffernan
David Heffernan

Reputation: 612874

Is there some general mechanism in running 32bit Delphi 5 on a 64bit machine that makes this likely?

If you have marked your application as LARGEADDRESSAWARE by modifying the PE flags post-build, then you may encounter problems because the Borland memory manager is not compatible with address >2GB.

If your application is not LARGEADDRESSAWARE then there is no obvious reason for it to fail on a 64 bit machine but not on a 32 bit machine. In which case the most plausible explanation is nothing more prosaic than your code having a defect that needs to be debugged.

Upvotes: 2

Related Questions