Hello!
I learned yesterday that in DelphiXE using the compiler directive:
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
you can access/use 4GB address space on 64bit computers even though DelphiXE compiler produces a 32bit code.
I tried today DelphiXE program on 4GB machine with Windows7 and after starting the program I really get the following result:
- Kbytes of physical memory: ~4.000.000KB
- Kbytes of free physical memory: ~3.200.000KB
- Percent of Memory in use: ~20%
- Kbytes of virtual address space: ~4.000.000KB¨
- Kbytes of free virtual address space: ~4.000.000KB
Each time after loading several objects (tables, strings, lists, a lot of pointers) the amoung of free memory goes down, what is fine, untill all memory is used. Everything fine. But here are some questions:
1. Sometimes I got the filling that program is using hard disc instead of RAM, because it slows down (but the memory is still available). Is that possible? If yes, how to prevent program using disc, when RAM is still available? Or maybe some temporary files are written to disc?
What would happen with the same program on machine with 8G Ram? Would 32bit program be able to use all 8G? I guess not since pointers are only 32 bits and there is a limit what they can access.
If I would compile the same program on 64bit machine with 64 bit compiler (what is not possible yet unfortunatelly), my guess is that on machine with 4GRam, 64bit program would have less free RAM space available than 32bit program with "IMAGE_FILE_LARGE_ADDRESS_AWARE" enabled, because pointers are 64bits and therefore they alone spent more space than 32 bit pointers. Am I thinking completelly wrong?
Thanks for any reply.