C stack frame sizes

Mike Lutz mjl at ritcv.UUCP
Sun Dec 16 02:26:01 AEST 1984

>One point which hasn't been made about the issue of stack frame sizes,
>... [is that] if you call a function right at the start of your program which
>uses lots of stack space it stays allocated.

Actually, this was use to advantage in the original Pascal compiler
system from Amsterdam.  One of the C programs in the set (I forget
which one) used *gobs* of data space, so to make it run on a PDP-11 the
I/O buffers were declared as local variables in the main function, and
thus were on the stack.  Given the constraints imposed by the PDP-11
MMU, this actually resulted in a net gain in useful data memory as
compared to allocating buffers dynamically using sbrk.
Mike Lutz	Rochester Institute of Technology, Rochester NY
UUCP:		{allegra,seismo}!rochester!ritcv!mjl
CSNET:		mjl%rit at csnet-relay.ARPA

More information about the Comp.lang.c mailing list