From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,e578d1b360f2357c,start X-Google-Attributes: gidf678f,public From: st002279@sub3.hrz.tu-darmstadt.de (Alexander Mai) Subject: Memory management of Fortran RTL Date: 1999/03/25 Message-ID: <7ddqmj$bg7$1@sun27.hrz.tu-darmstadt.de>#1/1 X-Deja-AN: 459015953 Distribution: world Organization: Technische Universitaet Darmstadt Newsgroups: comp.unix.osf.misc 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