Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: nmm1@cus.cam.ac.uk (Nick Maclaren)
Subject: Re: fortran error?
Date: 1998/03/20	[thread overview]
Message-ID: <6euvli$m47$1@lyra.csx.cam.ac.uk> (raw)
In-Reply-To: y6u38tay23.fsf@tweedledumb.cygnus.com


In article <y6u38tay23.fsf@tweedledumb.cygnus.com>,
Craig Burley  <burley@tweedledumb.cygnus.com> wrote:
>
>It's quite easy to compute a call tree and thus flatten the estimate
>of the maximum, though.
>
>What I'm trying to say is probably not what I'm saying, I'm afraid,
>but I'll try again: in FORTRAN 77, it is fairly easy and straightforward
>to determine that a given program will not only *fit* into a given
>amount of memory, but will never ask for any *more* memory while
>running.

While this is true, it is a bit deceptive.  You are quite correct as
far as most constructions are concerned, and we used to do precisely
that when overlaying large programs into small regions (remember that
fun and games?)

However, one rare construction in Fortran 77 (character concatenation)
can theoretically lead to a program with O(N) total allocated space
needing O(2^N) to run.  Which is, of course, why almost all compilers
have an ad-hoc kludge or two for the space to use for that horrible
construction :-(

>> But the even simpler analysis of determining the stack resources
>> required for each subroutine, and refusing to start if the stack was
>> too small, was never, as far as I know, done.
>
>Oh, sure it was, in *effect* if not explicitly.
>
>On some now-ancient machines, you compiled your Fortran modules,
>you linked them together, and you got an executable.  If it was
>too big, you couldn't run it in a given amount of memory -- heck,
>in some cases, that meant you couldn't *link* it in the first
>place!

Yes, quite.  And not so ancient machines, either.  VS Fortran under
IBM MVS and CMS used that technique right up until its first CEL
(Common Execution Library) version - sometime in the late 1980s.

On the matter of systems that allow specification in advance, quite
a lot of mainframes did that - indeed, I would say almost all.  And
even today, products like NQS do, but it typically done only for
supercomputers.  Memory may be cheap - but not if you want it both
extremely fast, and by the terabyte!


[ And, yes, I agree with most of the rest of your points! ]


Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email:  nmm1@cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679



  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         ` Craig Burley
1998-03-19  5:00           ` Peter Shenkin
1998-03-19  5:00             ` Craig Burley
1998-03-20  5:00               ` Peter Shenkin
1998-03-20  5:00                 ` Richard Maine
1998-03-20  5:00                 ` Craig Burley
1998-03-20  5:00                   ` Nick Maclaren [this message]
1998-03-20  5:00                     ` Richard Maine
1998-03-20  5:00                   ` Peter Shenkin
1998-03-23  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-23  5:00                       ` Summary (I hope) failure of automatic allocation; was, " Peter Shenkin
1998-03-24  5:00                         ` Craig Burley
1998-03-20  5:00               ` Nick Maclaren
1998-03-20  5:00             ` Dick Hendrickson
1998-03-20  5:00               ` Craig Burley
1998-03-20  5:00                 ` Peter Shenkin
1998-03-23  5:00                   ` Craig Burley
1998-03-20  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     ` 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