mtrace for a fortran program

Carlos O'Donell carlos@systemhalted.org
Wed Nov 12 14:19:00 GMT 2008


On Tue, Nov 11, 2008 at 2:03 PM, Davide Del Vento <ddvento@ucar.edu> wrote:
> Folks,
> 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
>
> To your knowledge, is it possible to use mtrace to detect memory leaks
> in a fortran program?

Does your gfortran program actually call malloc? If you disassemble
the resulting binary do you see a call to malloc? If you use readelf
does the resulting binary contain an undefined reference to malloc
(which would be resolved at run-time to the C library)?

Cheers,
Carlos.



More information about the Libc-help mailing list