Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!athena.mit.edu!mlzerkle From: mlzerkle@athena.mit.edu (Michael L Zerkle) Newsgroups: comp.lang.fortran Subject: Dynamic Memory Management in Fortran Message-ID: <1990Nov15.193022.26008@athena.mit.edu> Date: 15 Nov 90 19:30:22 GMT Sender: daemon@athena.mit.edu (Mr Background) Reply-To: mlzerkle@athena.mit.edu (Michael L Zerkle) Organization: Massachusetts Institute of Technology Lines: 26 I would like the thank everyone for there comments and advice RE: my previous posting. I now see what I was doing wrong. Fortran sets the address of arrays at compile-time, and will not permit the address to be changed. As a result, the Fortran definition, real*8 a(1) translates to C something like, const double *a; I thought that since most if not all Fortran compilers are written in C that I might be able to fool the compiler into doing what I wanted. That is just not the case. What I ended up doing was writing some C functions that implemented the BSD Fortran bindings to the falloc() and free() subroutines. Therefore, on the systems that have the falloc() and free() subroutine is use the resident version, and on the systems that do not (the ones running Sys 5.3, etc) I use my bindings. Everyone, thanks again for your help! Mike Zerkle mlzerkle@athena.mit.edu