[comp.sys.amiga.tech] Command stack sizes

mwm@mica.berkeley.edu (Mike (I'll think of something yet) Meyer) (08/20/89)

In <Aug.18.23.07.59.1989.554@pilot.njin.net>
limonce@pilot.njin.net (Tom Limoncelli) says:
<Better yet, why not have the executable include info like what size
<the stack SHOULD be, then remove the STACK command from the C:
<directory and just rely on programmers to make sure that their
<executable have the right info.  (Of course, in the phase-out stage
<the value set in the STACK command [which would have an -l option, of
<course] which would set up a default size for older programs.

This is basically what the WorkBench does - the icon allows the
default stack size to be overridden. And this would be a major
improvement on the current situation. However, the stack useage of
many commands depends on their input data: both C compilers use
recursive descent parsers for statements; programs that walk the file
tree may use the program stack to keep track of where they are
(treewalk doesn't - that was a design goal); programs that allow
macros to invoke themselves may use the program stack for tracking
macro return values, etc.

Because of this, you can't just do away with user stack control. You
have to provide a command that allows the user to force a program to
run with a specified stack size, instead of the default. Some way of
changing the default should also be provided. This also has to be made
to work with the various resident facilities in a reasonable manner.

	<mike

--
My feet are set for dancing,				Mike Meyer
Won't you turn your music on.				mwm@berkeley.edu
My heart is like a loaded gun,				ucbvax!mwm
Won't you let the water run.				mwm@ucbjade.BITNET