Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* Memory management of Fortran RTL
@ 1999-03-25  5:00 Alexander Mai
  0 siblings, 0 replies; only message in thread
From: Alexander Mai @ 1999-03-25  5:00 UTC (permalink / raw)




When I'm dynamically allocating memory during runtime of a program
and release/free it, the virtual memory size does not seem seem
to honor this and remain at the peak level (according to
the ps output and the error message given below). 
A following second allocation seems to extent the heap size even
further and I may run into a 'insufficent virtual memory' warning/error.

In C the above seems to hold WRT VSZ, however a basic excample
(a few malloc()s,free()s) doesn't raise the error.
In Fortran (using f90 on DU 4.0) it might be a problem of 'someone'
just learning Fortran 90:
the 'dynamic' area is a multi-dimensional array implemented either
as a pointer or a dynamic (alloctable) array which resides in
a module. A subroutine tries to allocate it a few times, while
various others free/deallocate it in between (an attempt to gain memory
for intermediate calculations)
Independent of this choice (pointer vs. array) I end up with the error.
Either the heap just refuses to shrink or I erroneously introduced
a memory leak. However I never made other references to this memory
except this single variable.

(Perhaps this should have gone to comp.lang.fortran.beginners ... ;-)


Thanks for helpful comments in advance,

-- 
Alexander Mai
st002279@hrzpub.tu-darmstadt.de



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-03-25  5:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-25  5:00 Memory management of Fortran RTL Alexander Mai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox