Using IMAGE_FILE_LARGE_ADDRESS_AWARE 32bit - 64bit

这一生的挚爱 提交于 2019-12-06 06:12:57

Yes, the Operating System will swap parts of your virtual memory (what you call RAM) to the paging file if it decides this is necessary.

A 32 bit program will not be able to use more than 4 GB (even on 64 bit Windows) and finally a native 64 bit program will not use more memory than a 32 bit program because of the pointer size (internally 32 bit pointer are 64 bit pointers in x64 windows).

And a side note: if you set the Large Address Aware switch you should be really sure that your application (which includes vcl, delphi units and components) can handle addresses > 2 GB. For instance casting a pointer to an Integer is something which is not allowed then. There are more pitfalls of course.

64 bit applications use some more memory than 32 bit ones, because some data types will be 64 bit long instead of 32 (not only pointers - and that depends on what datatypes your applications uses and compiler standard types). Also some instructions may requires more bytes to be coded. As UTF-16 strings require more space than ANSI ones. Of course if you have to manipulate large 64 bit structures is not a good idea to use a 64 bit machine with 4GB RAM only. One of the reason to use a 64 bit OS is to manage more than 4GB without using any pagination trick.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!