Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Fortran memory leaks

887279Sep 9 2011 — edited Sep 11 2011
I'm trying to determine whether we have any memory leaks in our Fortran 95 program using check -leaks. We use several allocate and deallocate statements and using the showleaks command in dbx does show a memory leak, but nothing seems to change whether deallocate is used or not. Does check -leaks work correctly for Fortran memory leaks? We're using deallocate(obj.array) where the array is allocatable and obj is nullified after deallocating. Removing the deallocate statement doesn't increase the number of leaks reported.

Also, I'd like to clarify when Fortran memory leaks are possible. It is my understanding that local allocatable arrays (when not saved) are automatically deallocated when they go out of scope. Is this true? Do I only need to worry about memory leaks from global variables (i.e., declared in modules)?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2011
Added on Sep 9 2011
3 comments
1,082 views