Dec 112017
 
Microsoft Fortran patch to correct near heap memory allocation problem.
File HF0451.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Microsoft Fortran patch to correct near heap memory allocation problem.
File Name File Size Zip Size Zip Type
HF0451.DOC 5135 1936 deflated
LARGE 0 0 stored
PUTERR.OBJ 1724 1165 deflated
MEDIUM 0 0 stored
PUTERR.OBJ 1644 1120 deflated
MT 0 0 stored
PUTERR.OBJ 2176 1424 deflated
OS2DLL 0 0 stored
PUTERR.OBJ 2198 1436 deflated
WIN 0 0 stored
WINDLL 0 0 stored
PUTERR.OBJ 2035 1375 deflated
PUTERR.OBJ 2078 1399 deflated

Download File HF0451.ZIP Here

Contents of the HF0451.DOC file


======================================================================
Microsoft Product Support Services Application Note (Text File)
HF0451: PATCH FOR NEAR HEAP MEMORY ALLOCATION PROBLEM
======================================================================
Revision Date: 9/91
Disk Included

The following information applies to Microsoft FORTRAN version 5.1.

--------------------------------------------------------------------
| INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY |
| ACCOMPANY THIS DOCUMENT (collectively referred to as an |
| Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY |
| KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO |
| THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |
| PARTICULAR PURPOSE. The user assumes the entire risk as to the |
| accuracy and the use of this Application Note. This Application |
| Note may be copied and distributed subject to the following |
| conditions: 1) All text must be copied without modification and |
| all pages must be included; 2) If software is included, all files |
| on the disk(s) must be copied without modification [the MS-DOS(R) |
| utility DISKCOPY is appropriate for this purpose]; 3) All |
| components of this Application Note must be distributed together; |
| and 4) This Application Note may not be distributed for profit. |
| |
| Copyright 1991 Microsoft Corporation. All Rights Reserved. |
| Microsoft, MS-DOS, and the Microsoft logo are registered |
| trademarks and Windows is a trademark of Microsoft Corporation. |
--------------------------------------------------------------------

Introduction
------------

This application note corrects a near-heap memory-management problem
in FORTRAN version 5.1. The problem occurs only when specific
configurations of READ or WRITE statements are used. The error most
commonly caused by this problem is "Run-time error F6700: - heap space
limit exceeded."

The conditions necessary to cause this error are:

1. The program must contain a READ or WRITE statement with an END=,
ERR=, or IOSTAT= specification.

2. The READ or WRITE statement that contains one of the above
specifications must use a character string variable for a FORMAT
specifier.

3. The program code must repeatedly execute the READ or WRITE
statement in a way that forces the use of one of the specifications
-- for example, repeatedly reaching the end of a file and causing
the END= specification to go to the specified label.

Given the above conditions, the near heap will fill with replicates of
the character string FORMAT specifier until the F6700 error is
generated. The larger the character string, the faster the near heap
will be filled up. The F6700 error most commonly occurs on an OPEN
statement. The OPEN statement allocates some memory in both the near
and far heap and will fail with the F6700 error if there isn't
sufficient near heap. With the new replacement routines in the
PUTERR.OBJ module, this accumulation of allocated memory on the near
heap does not occur because the memory used is correctly deallocated
following termination of the READ or WRITE statement.

Modifying the Run-time Library
------------------------------

The files on the enclosed disk are replacement copies of the
PUTERR.OBJ object module contained in the FORTRAN 5.1 run-time
libraries. The version of PUTERR.OBJ you will use depends on which
run-time library you want to correct.

The files on the enclosed disk and the corresponding run-time
libraries into which the files should be installed are as follows:

File Libraries
---- ---------


LARGE\PUTERR.OBJ LLIBF7R.LIB, LLIBFOR7.LIB, LLIBF7P.LIB,
LLIBFAR.LIB, LLIBFORA.LIB, LLIBFAP.LIB,
LLIBFER.LIB, LLIBFORE.LIB, LLIBFEP.LIB

MEDIUM\PUTERR.OBJ MLIBF7R.LIB, MLIBFOR7.LIB, MLIBF7P.LIB,
MLIBFAR.LIB, MLIBFORA.LIB, MLIBFAP.LIB,
MLIBFER.LIB, MLIBFORE.LIB, MLIBFEP.LIB

OS2DLL\PUTERR.OBJ FDLLOBJS.LIB (OS/2 DLL library)

MT\PUTERR.OBJ LLIBFMT.LIB (OS/2 multithread library)

WIN\PUTERR.OBJ LLIBFEW.LIB

WINDLL\PUTERR.OBJ LDLLFEW.LIB

To make the correction to the desired run-time library, copy the
appropriate version of PUTERR.OBJ from the enclosed disk to the same
directory as the library, and then issue the following command

LIB -+PUTERR.OBJ;

where represents the name of the library you want to
modify. You can then delete the copy of PUTERR.OBJ from the library
directory. The library manager will make a backup file named
. When the new library has been tested successfully, you
can also delete this backup file.


 December 11, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)