PRB: F1901: "Program Too Large for Memory" ErrorLast reviewed: July 20, 1995Article ID: Q49708 |
The information in this article applies to:
SYMPTOMSCompiling an application causes the compiler to generate the following message:
F1901: program too large for memory CAUSEOne possible cause is that the application includes a DATA statement that contains an extensive amount of data. The compiler stores data in the near heap during compilation. The error occurs when the near heap is exhausted. See the Sample code below.
RESOLUTIONTo address this situation, perform one of the two steps below:
MORE INFORMATIONBy default, the SETUP program for FORTRAN version 5.1 installs F1L.EXE into the C:\FORTRAN\BIN directory. The compiler command line is as follows:
FL /B1 F1L.EXE TEST.FORIn FORTRAN version 5.0, copy the F1L.EXE file from the High Capacity Compiler Disk into the FORTRAN BIN directory (by default, C:\FORTRAN\BIN). The compiler command line is as follows:
FL /B1 C:\FORTRAN\BIN\F1L.EXE TEST.FORThe following code example demonstrates this situation. If you change the array subscript in the declaration for the TMP array from 254 to 256, or if you add another data item to the source code, the program is too large for the first pass of the FORTRAN compiler to process. To address this situation, use the high-capacity FORTRAN compiler as discussed above.
Sample CodeC Compile options needed: See above
SUBROUTINE TEST () REAL TMP(254) ! LOW CC LIMIT 254 DATA TMP / 0.0, .035, .049, .049, 0.0, 0.0, .068, .068, 0.0, Z .095, .095, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, .049, Z .065, .065, 0.0, 0.0, .088, .088, 0.0, .119, .119, Z 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, .049, .065, .065, Z 0.0, 0.0, .091, .091, 0.0, .126, .126, 0.0, 0.0, Z 0.0, 0.0, 0.0, .065, .065, .083, .083, 0.0, 0.0, Z .109, .109, 0.0, .147, .147, 0.0, 0.0, 0.0, .187, Z .294, .065, .065, .083, .083, 0.0, 0.0, .113, .113, Z 0.0, .154, .154, 0.0, 0.0, 0.0, .218, .308, .065, Z .065, .109, .109, 0.0, 0.0, .133, .133, 0.0, .179, Z .179, 0.0, 0.0, 0.0, .250, .358, .065, .065, .109, Z .109, 0.0, 0.0, .140, .140, 0.0, .191, .191, 0.0, Z 0.0, 0.0, .250, .382, .065, .065, .109, .109, 0.0, Z .095, .095, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, .049, Z .065, .065, 0.0, 0.0, .088, .088, 0.0, .119, .119, Z 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, .049, .065, .065, Z 0.0, 0.0, .091, .091, 0.0, .126, .126, 0.0, 0.0, Z 0.0, 0.0, 0.0, .065, .065, .083, .083, 0.0, 0.0, Z .109, .109, 0.0, .147, .147, 0.0, 0.0, 0.0, .187, Z .294, .065, .065, .083, .083, 0.0, 0.0, .113, .113, Z 0.0, .154, .154, 0.0, 0.0, 0.0, .218, .308, .065, Z .065, .109, .109, 0.0, 0.0, .133, .133, 0.0, .179, Z .179, 0.0, 0.0, 0.0, .250, .358, .065, .065, .109, Z .109, 0.0, 0.0, .140, .140, 0.0, .191, .191, 0.0, Z 0.0, 0.0, .250, .382, .065, .065, .109, .109, 0.0, Z .095, .095, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, .049, Z 0.0, 0.0, .091, .091, 0.0, .126, .126, 0.0, 0.0, Z 0.0, 0.0, 0.0, .065, .065, .083, .083, 0.0, 0.0, Z .109, .109, 0.0, .147, .147, 0.0, 0.0, 0.0, .187, Z .294, .065, .065, .083, .083, 0.0, 0.0, .113, .113, Z 0.0, .154, .154, 0.0, 0.0, 0.0, .218, .308, .065, Z .065, .109, .109, 0.0, 0.0, .133, .133, 0.0, .179, Z .179, 0.0, 0.0, 0.0, .250, .358, .065, .065, .109, Z .109, 0.0, 0.0, .140, .140, 0.0, .191, .191, 0.0, Z 0.0, 0.0, .250, .382, .065, .065, .109, .109, 0.0, Z .095, .095, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, .049, Z .065, .065, 0.0, 0.0, .088, .088, 0.0, .119, .119, Z 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, .049, .065, .065, Z 0.0, 0.0, .091, .091, 0.0, .126, .126, 0.0, 0.0, Z 0.0, 0.0, 0.0, .065, .065, .083, .083, 0.0, 0.0, Z .109, .109, 0.0, .147, .147, 0.0, 0.0, 0.0, .187, Z .294, .065, .065, .083, .083, 0.0, 0.0, .113, .113, Z 0.0, .154, .154, 0.0, 0.0, 0.0, .218, .308, .065, Z .065, .109, .109, 0.0, 0.0, .133, .133, 0.0, .179, Z .179, 0.0, 0.0, 0.0, .250, .358, .065, .065, .109, Z .109, 0.0, 0.0, .140, .140, 0.0, .191, .191, 0.0, Z 0.0, 0.0, .250, .382, .065, .065, .109, .109, 0.0, Z .095, .095, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, .049, Z .065, .065, 0.0, 0.0, .088, .088, 0.0, .119, .119, Z 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, .049, .065, .065, Z 0.0, 0.0, .091, .091, 0.0, .126, .126, 0.0, 0.0, Z 0.0, 0.0, 0.0, .065, .065, .083, .083, 0.0, 0.0, Z .109, .109, 0.0, .147, .147, 0.0, 0.0, 0.0, .187, Z .294, .065, .065, .083, .083, 0.0, 0.0, .113, .113, Z 0.0, .154, .154, 0.0, 0.0, 0.0, .218, .308, .065, Z .065, .109, .109, 0.0, 0.0, .133, .133, 0.0, .179, Z .179, 0.0, 0.0, 0.0, .250, .358, .065, .065, .109, Z .109, 0.0, 0.0, .140, .140, 0.0, .191, .191, 0.0, Z 0.0, 0.0, .250, .382, .065, .065, .109, .109, 0.0, Z 0.0, .145, .145, 0.0, .200, .200, 0.0, 0.0, 0.0, .281/ WRITE (*,*) TMP END |
Additional reference words: 4.00 4.01 4.10 5.00 5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |