Large memory programs & Windows XP

Large memory programs & Windows XP

I am trying to migrate a Fortran program from Unix to Windows XP Professional using Compaq Visual Fortran 6.6a. The program compiles error free, but encounters a warning LNK4084: total image size -1042087936 exceeds max (268435456); image may not run. And sure enough it doesn't run. The help on LNK4084 says programs over 256-MB can't be run.

Commercial applications, such as PTC ProE, are now successfully addressing up to 3-GB of memory space using the Windows XP Professional server memory model address. My question is will Compaq Visual Fortran support the Windows XP Professional memory model in the near future so we can run larger Fortran programs?

Gerry

8 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

The 3GB memory model is supported on Windows.NET Enterprise Server (not yet released) and Windows 2000 Datacenter Server only, not XP Professional, and requires special Win32 API calls to dynamically allocate the additional memory. It does not support static allocation exceeding 2GB, which is what you're trying to do.

I can't find anything on the PTC web site describing the use of 3GB of memory, so am not sure what they are doing.

The help for LNK4084 says that programs with static memory sizes obver 256MB may not run, and that is correct - if you try to run them on Windows 95 or Windows NT4 prior to SP3, they won't run. In later editions of Windows, the 256MB limit is lifted, allowing you to use as much of the 2GB process address space as Windows will permit (typically about 1.75GB).

Steve

Steve - Intel Developer Support

Steve,

While you are correct that Windows 2000 Professional does not support the "/3GB" switch, all versions of Windows 2000 server OS's support the "/3GB" switch. The "/PAE" switch is only supported in the Advanced & Datacenter version of the server OS (see: Q274558 on the microsoft web site)

If a application does not use Windows API's to determine how much memory is available for allocation then the "/LARGEADDRESSAWARE" flag of the linker will allow application to allocate more than 2GB of memory before it receives an allocation error. If the application does use Windows API's to determine how much memory is avalible for allocation then the application will need to be modified based on the table shown in article Q274558 of the microsoft web site.

Hope this make things a little clearer

Richard Carpenter
Microsoft Corporation

Richard,

Thanks for the info. I had a difficult time finding comprehensive material about use of /3GB on the Microsoft site.

Will the linker allow up to 3GB of static allocation with /LARGEADDRESSAWARE? I was under the impression that this was for run-time allocation only.

Unfortunately, Q274558 is rather cryptic regarding on which Windows versions you can actually use 3GB of virtual memory.

Steve

Steve - Intel Developer Support

Based on the image size you should be able to run your program if you adjust the system paging file accordingly. Also it never hurts to up your working set to reduce paging as an optimization (depending upon how you access the memory).

James

How do you adjust working set sizes on NT (and XP)?

James,

Note that the image size was listed as a negative value. That means that the static code and data size exceeded 2GB. It's not going to run, to the best of my knowledge.

Steve

Steve - Intel Developer Support

Ah, I didn't see the "-" as it was on the previous line. That leave the options at finding inefficiency in the data structures, using an "overlay" concept (remember 16 bit?) or ia64 if you want to use Windows.

Regarding working set size, use the Win32 call SetProcessWorkingSetSize at the beginning of your code. Appropriate values will depend upon the amount of physical memory installed and the nature of the system, of course.

James

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen