Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Memory leak with WRITE operation on an internal file (variable of CHARACTER type)

$
0
0

Consider the following trivially simple program :

PROGRAM p

   IMPLICIT NONE

   !.. Local variables
   CHARACTER(LEN=2) :: StrBuffer
   INTEGER :: I

   I = 1
   WRITE(StrBuffer, FMT='(I2)') I

   !..
   STOP

END PROGRAM p

When the code is compiled with Intel Fortran (version 14 or 2015 Beta) and the program is executed, Dr Memory utility indicates there is a memory leak associated with the WRITE statement.  The output generated by the utility is as follows:

         Dr. Memory version 1.7.0
         Running "Debug\TestFor32.exe"

         Error #1: LEAK 12 bytes
         replace_malloc
             d:\drmemory_package\common\alloc_replace.c(2320):
         for__get_vm
             ??:0
         for__acquire_lun
             ??:0
         for_write_int_fmt
             ??:0
         P
             TestFor.f90(10):
         main
             ??:0

         ERRORS FOUND:
               0 unique,     0 total unaddressable access(es)
               0 unique,     0 total uninitialized access(es)
               0 unique,     0 total invalid heap argument(s)
               0 unique,     0 total GDI usage error(s)
               0 unique,     0 total handle leak(s)
               0 unique,     0 total warning(s)
               1 unique,     1 total,     12 byte(s) of leak(s)
               0 unique,     0 total,      0 byte(s) of possible leak(s)
         Details: C:\..\DrMemory-TestFor32.exe.4680.000\results.txt

Can someone at Intel please investigate and provide feedback on this memory leak?  In one of my codes, such a WRITE operation on an internal file can occur many times and there are some performance issues with this code, hence I appreciate any clarification any one can provide.

Thanks,


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>