Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Richard Maine <maine@altair.dfrc.nasa.gov>
Subject: Re: fortran error?
Date: 1998/03/20	[thread overview]
Message-ID: <ueg1kdutr9.fsf@altair.dfrc.nasa.gov> (raw)
In-Reply-To: 351296BC.167E@still3.chem.columbia.edu


Peter Shenkin <shenkin@still3.chem.columbia.edu> 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



  parent reply	other threads:[~1998-03-20  5:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-12  5:00 fortran error? Armin Leuprecht
1998-03-12  5:00 ` robin
1998-03-16  5:00 ` Steve Lionel
1998-03-17  5:00   ` Peter Shenkin
1998-03-17  5:00     ` Craig Burley
1998-03-17  5:00       ` Peter Shenkin
1998-03-18  5:00         ` Toon Moene
1998-03-18  5:00           ` Jeff Drummond
1998-03-19  5:00           ` Peter Shenkin
1998-03-18  5:00         ` Craig Burley
1998-03-19  5:00           ` Peter Shenkin
1998-03-19  5:00             ` Craig Burley
1998-03-20  5:00               ` Nick Maclaren
1998-03-20  5:00               ` Peter Shenkin
1998-03-20  5:00                 ` Craig Burley
1998-03-20  5:00                   ` Peter Shenkin
1998-03-23  5:00                     ` Craig Burley
1998-03-23  5:00                       ` Summary (I hope) failure of automatic allocation; was, " Peter Shenkin
1998-03-24  5:00                         ` Craig Burley
1998-03-23  5:00                       ` Craig Burley
1998-03-23  5:00                         ` Peter Shenkin
1998-03-24  5:00                           ` Craig Burley
1998-03-24  5:00                             ` Nick Maclaren
1998-03-20  5:00                   ` Nick Maclaren
1998-03-20  5:00                     ` Richard Maine
1998-03-20  5:00                 ` Richard Maine [this message]
1998-03-20  5:00             ` Dick Hendrickson
1998-03-20  5:00               ` Peter Shenkin
1998-03-20  5:00               ` Craig Burley
1998-03-20  5:00                 ` Peter Shenkin
1998-03-23  5:00                   ` Craig Burley
1998-03-18  5:00     ` Steve Lionel
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