vendredi 23 avril 2010

Fortran error

LNK4084 error, "total image size exceeds max... image may not run"


256M image size 限制是windows操作系统造成的:

Windows 95 and NT 4.0 (prior to SP3) have a limit on the virtual address space of processes or applications of 256 MB. Windows XP/2000/NT 4.0 (SP3+)/Me/98 have a limit of 2 GB. For more information, including how to increase the limit to 3 GB, see Memory Support and Windows Operating Systems .
A program can contain a number of allocatable arrays that exceed the limit, as long as the total sizes of those that are allocated at any point during execution do not exceed the limit.

可能的解决问题的方法:
1.把静态内存分配改成动态分配;
2.有时把静态分配的数组加save属性也能解决问题;
3.操作系统升级;
4.增加物理内存数量;
5.修改程序,减少大数组的使用。

Aucun commentaire:

Enregistrer un commentaire