The information in this article applies to:
SYMPTOMSWhen you run a QuickWin program and try to allocate a huge array dynamically, the return code may be 6700. The associated error message, as documented in the FORTRAN Professional Development System on page 489, is:
CAUSEOne cause of the error may be attempting to allocate a huge array (greater than 64K) where the data items do not align on 64K segment boundaries. RESOLUTIONChange the data type such that the array will align on the 64K boundary. STATUSThis behavior is by design. MORE INFORMATIONIf you attempt to dimension the huge array statically, the compiler produces this error: Compiling and running the following code sample produces an output for 'istat' of 6700, indicating the heap space was exceeded and no dynamic memory was allocated. If you change the line declaring the array 'str' as allocatable into a comment, and change the static declaration from a comment into an excuted line, the compiler produces the F2120 error. Changing the declaration to:
eliminates the error in both cases.
Sample Code
Additional query words: 5.10 fail memory allocation
Keywords : |
Last Reviewed: November 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |