Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!UMIX.CC.UMICH.EDU!krowitz%richter From: krowitz%richter@UMIX.CC.UMICH.EDU (David Krowitz) Newsgroups: comp.sys.apollo Subject: Re: help with Fortran bug (sr9.7.5 ftn 9.95) Message-ID: <9001041546.AA04656@richter.mit.edu> Date: 4 Jan 90 15:46:58 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 49 We write programs larger than 5MB all the time (actually, most of the time!). The only limits are: 1) The virtual memory address space of your particular model of workstation. All Apollo nodes have at least 64MB of address space. Older DN3000 (prior to the DN3000 model 3010) were limited to 64MB; later model DN3000's (model 3010 and 3010A) have a larger address space (256MB, I think); and DN4000's, DN3500's and DN4500's have something like 1GB or more. 2) The amount of free disk space on the node (or, if it is a diskless machine, it's partner's free disk space). There has to be at least enough free disk space to equal the amount of virtual memory (ie. the total size of all the arrays, variables, code, and I/O buffers) used by your program. Under SR9.7, the disk space was allocated as your program began to use it (ie. disk space for a particular array wasn't allocated until you first began to use the array). Under SR10, the entire amount of disk space is allocated as soon as the program is started. This guarantees that the program will not die from running out of disk space after hours of work. If you *need* to use SR9.7 style disk allocation, there is a rumor of an unsupported option to the SR10 binder (/com/bind) that will allow you to do this. 3) The size of the stack. The stack is part of a program's virtual memory will is used for the temporary storage of variables and subroutine call/return arguments. On Motorola 680x0 machines, the default stack size is something like 256Kb (or maybe 500Kb, I'm not so certain on this), and on PRISM machines (the DN10000) it's 5Mb. You can change the stack size with a switch to the binder. Fortran subroutines and functions allocate all of their variables and arrays, except for those passed in the subroutine call, those declared as COMMON, or those which are declared in a SAVE statement, in the stack array. When the subroutine/function returns, the stack space is reclaimed and can be used by the next subroutine/function call. The space used on the stack by a subroutine for its variables and the call/return information is a "stack frame". You can damage a subroutine's stack frame by over writing the bounds of an array, by passing subroutine arguments whose size does not match the expected size in the subroutine (or by passing too many or too few arguments), by accessing data via an invalid pointer, etc. -- David Krowitz krowitz@richter.mit.edu (18.83.0.109) krowitz%richter.mit.edu@eddie.mit.edu krowitz%richter.mit.edu@mitvma.bitnet (in order of decreasing preference)