Jose Marin asked:
>I'm curious: in that situation (fortran automatic arrays which are big and
>are allocated on the heap), does the compiler dealocate them after exiting
>the subroutine, or does it treat them as if they were SAVEd?
*automatic arrays* are deallocated on exit - they cannot be treated as SAVEd
(the size may vary from one invocation of the procedure to the next, and is
not known at compile-time in any case).
*large non-automatic arrays* we make static (as if they were SAVEd) except in
a recursive procedure where we put them on the heap (and deallocate them on
exit).
Cheers,
--
...........................Malcolm Cohen, NAG Ltd., Oxford, U.K.
([log in to unmask])
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|