Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: st002279@sub3.hrz.tu-darmstadt.de (Alexander Mai)
Subject: Memory management of Fortran RTL
Date: 1999/03/25	[thread overview]
Message-ID: <7ddqmj$bg7$1@sun27.hrz.tu-darmstadt.de> (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



                 reply	other threads:[~1999-03-25  5:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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