EVERHART%ARISIA.decnet@crdgw1.ge.com (10/04/89)
Stack usage sometimes depends on the whims of your compiler writer. Absoft "normally" allocates all Fortran commons on the stack, requiring quite hefty allocations. (One can use the -h switch at compile time to use heap instead, which I normally do, but this switches a great many features not all of which may be desired.) The problem with CLI environments is that the *same* stack allocation must be used for all programs invoked at a time, needed or not. One can of course use the stack command to switch the amount, but the fact that it's not automatic and that the loader knows nothing of requirements and thus won't warn of a too-small stack means running with the default 4K is frequently asking for trouble. Consider (again) RSX: stack requirements are variable, but the image is built for a given stack size, and the loading code sets the stack up per image as declared. Workbench allows variable stack sizes, showing this WAS thought of, but somehow the CLI loses in this way. Is there in fact no way to find how much stack a program was built for, from the image? Or are all traces normally left in the icon and user manuals of respective programs? (My set of manuals is presently 30 miles off...). Certainly one can waste stack...or any other kind of memory. The system might make it easier to avoid this with a bit of change, though. Glenn Everhart Everhart%Arisia.decnet@crd.ge.com (...by the way, yes, I *do* sometimes program in C also...but I find it easier to convert legacy code w/o changing its language...)