Memory leaks in standard code

Paul Richard Thomas paul.richard.thomas@gmail.com
Tue Feb 26 07:22:00 GMT 2008


FX,

I have removed the error return in memory-check.c(free_check); I do
not think that it is necessary and it suppresses diagnostic
information.  In this case, the full output is

Error in memory deallocation at line 0 of source file '(null)':
freeing memory that has not been allocated by us.
Error in memory deallocation at line 0 of source file '(null)':
freeing memory that has not been allocated by us.


Fortran runtime checking: found 2 memory leaks
  - at line 0 of file '(null)', allocation of size 12
  - at line 0 of file '(null)', allocation of size 12

which confirms that the problem lies with the allocation and freeing
of x.i.data and y.i.data.

I still do not see why, however!  The next step will be to print out
the address; apparently there is some way in which the assignments of
the pointer are screwing things up.

Cheers

Paul
>  I have checked that all the malloc's are absorbed into malloc_check
>  and stared at your memory-check.c without any glimmer of
>  enlightenment.
>
>  Cheers
>
>  Paul
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy



More information about the Fortran mailing list