Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!cornell!batcomputer!riley From: riley@batcomputer.tn.cornell.edu (Daniel S. Riley) Newsgroups: comp.lang.fortran Subject: Re: Maximum Stack Size for a Subprog.? Message-ID: <5836@batcomputer.tn.cornell.edu> Date: 9 Aug 88 15:25:47 GMT References: <47900003@uicsrd.csrd.uiuc.edu> <262@quintus.UUCP> Reply-To: riley@tcgould.tn.cornell.edu (Daniel S. Riley) Organization: Cornell Theory Center, Cornell University, Ithaca NY Lines: 27 In article <262@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >In article <47900003@uicsrd.csrd.uiuc.edu> leein@uicsrd.csrd.uiuc.edu writes: >>Hi, Fortran users, >>What is the limit of the dynamic storage --- so-called stack? [...lots of good points deleted...] >Under VMS, Fortran can use as much stack space as the operating system >will let it. Start with "SHOW PROCESS/QUOTAS" in the DCL manual, and >the qualifiers of the RUN command, to find out what the limits are and >how to set them. (You really need a native guide.) > >Be aware that many UNIX Fortran compilers (particularly ones derived >from AT&T's "f77" compiler) allocate local variables statically, The VMS Fortran compiler allocates all local variables statically, and it generally allocates the call frames for most subroutine calls statically (which is possible since Fortran is non-recursive). So, unless you explicitly call a system routine to allocate virtual memory, a VMS Fortran program uses very little stack space. This is possible because the VAX callg instruction (and VMS subroutine calling conventions) allow passing subroutine arguments from any section of memory, not just on the stack. The Apollo Fortran compiler has a switch which controls whether local variables not SAVEd are allocated statically or on the stack. -Dan Riley (dsr@crnlns.bitnet, dsr@lns61.tn.cornell.edu) -Wilson Lab, Cornell U.