Memory leaks in standard code

FX fxcoudert@gmail.com
Fri Feb 15 13:16:00 GMT 2008


Hi all,

I just have dusted a patch I had that instrumentalizes all memory
allocation and deallocation routines, allowing us to do whatever we
want to track them in the library. A few uses that pop to mind are
memory leaks and memory allocation statistics. I realize, though, that
having memory leaks is rather hard in Fortran, because of the
automatic deallocation on procedure exit... so I'm asking a very naive
question: is it possible at all? Would a -fcheck=memleak option be
useful at all? (With my current patch, all it requires it 20 more
lines of code in the library, so it's a rather low-hanging fruit.)

Thanks,
FX, ashamed of his ignorance of the Fortran standard


-- 
FX Coudert
http://www.homepages.ucl.ac.uk/~uccafco/



More information about the Fortran mailing list