run time memory allocation in FORTRAN

From: lombardi emanuele <lele_at_mantegna.casaccia.enea.it>
Date: Tue, 03 Feb 1998 16:01:18 +0100 (MET)

Hi managers!

I'm trying the way to have run-time allocation (and de-allocation) of memory
in FORTRAN
(AS 4100 Dunix 4.0b 512Mb 3CPU)

I'm using the fortran malloc, falloc and free routines.

My main program does the following
loop:
        ask me for the number of byte I want to to alloc,
        then actually alloc (by malloc or falloc),
        then writes data to the obtained memory
        then frees the memory itself.
end loop

While running the above fortran program, I watched at the memory usage
in my machine using ps and pvis.

The memory parameters I traced are:
virtual process size VSZ and resident process size RSS.

It seems to me that the execution of the malloc increments the values of the sole VSZ
while RSS grows up when the memory locations (provided by malloc) are actually written.

The amazing (to me) thing is that none of the VSZ and RSS go back to lover values
when the memory is freed (by free routine). The above values grow when a
bigger region of memory is requested, but remain stable when is
requested a smaller region.

Can you help me in beeing sure that I actually free the no-more-usefull
memory ?

Thanks from Italy,
Emanuele

-- 
 Emanuele Lombardi
 mail:  AMB-GEM-CLIM ENEA Casaccia
        I-00060 S.M. di Galeria (RM) 
        ITALY
 mailto:lele_at_mantegna.casaccia.enea.it
 tel	+39 6 30483366
 fax	+39 6 30483591
Received on Tue Feb 03 1998 - 15:58:57 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT