mtrace for a fortran program

Davide Del Vento ddvento@ucar.edu
Fri Nov 14 18:46:00 GMT 2008


Carlos O'Donell wrote:
>> I'm trying to use mtrace to detect memory leaks in a fortran program.
>> I'm using the gfortran compiler.
>> Unfortunately it does not work. I posted more details (including an
>> example program) in this forum:
>> http://stackoverflow.com/questions/260192/mtrace-for-a-fortran-program
>>
> Does your gfortran program actually call malloc?

Carlos,
Thank you very much. In fact you are right: there isn't any malloc call,
but just _gfortran_allocate_array ones (I updated the question on
stackoverflow.com accordingly).
I guess that _gfortran_allocate_array will call malloc, but of course I
do not know for sure (does anyone from the fortran list know?).
If this is the case, would it be possible to configure mtrace in order
to trace this indirect malloc calls?
Thanks again,
Davide Del Vento, Consulting Services Software Engineer
NCAR Computational & Information Services Laboratory
http://www.cisl.ucar.edu/hss/csg/




More information about the Libc-help mailing list