From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1094ba,1ef3b84ca62fad7b X-Google-Attributes: gid1094ba,public X-Google-Thread: fee84,1ef3b84ca62fad7b X-Google-Attributes: gidfee84,public From: Richard Maine Subject: Re: fortran error? Date: 1998/03/20 Message-ID: #1/1 X-Deja-AN: 336131617 References: <3507A4A5.F8A7DDC2@matd.tu-graz.ac.at> <6ejfii$kbd@usenet.pa.dec.com> <350E95A7.41C6@still3.chem.columbia.edu> <350EDA13.2781@still3.chem.columbia.edu> <351181DB.2781@still3.chem.columbia.edu> <351296BC.167E@still3.chem.columbia.edu> Followup-To: comp.lang.fortran Organization: NASA Dryden Newsgroups: comp.lang.fortran,comp.unix.osf.osf1 Peter Shenkin writes: > Craig Burley wrote: > ... > > Essentially, using FORTRAN 77, it is fairly straightforward to > > analyze a complete program and determine whether it will run > > to completion in a given amount of memory, because there's > > no ability to explicitly *or* implicitly demand dynamic > > allocation of memory resources (stack or heap). > > I think this isn't completely true... Oh, I'm quite certain that it is completely true. Remember that f77 was designed in days where many machines didn't have stacks or much of any other form of dynamic allocation. There are some quirky restrictions in f77 that are there specifically to cater to such machines. It is quite possible to run f77 with a stack size of zero and with no other form of dynamic allocation. Numerous proofs by example exist. This was basically a design requirement on the language. You basically do it by making *ALL* memory allocation static. Any temporary space needed for a subroutine call is statically allocated as part of the subroutine's memory. Comparably, if you want to use a stack, you can total the stack requirements for all of the subroutines. This is clearly not an optimal solution, but it trivially works in a non-recursive environment. And in the typical f77 implementation, where no user data ends up on the stack, even if a stack does exist, it isn't even an unreasonably large burden. -- Richard Maine maine@altair.dfrc.nasa.gov