How many stacks? (WAS: alloca(), #if, and other controversial things...)
Steven Ryan
smryan at garth.UUCP
Tue Aug 23 07:27:25 AEST 1988
>>I don't understand: the concept of a single big general purpose stack is
>>fundamental to any language that implements recursion.
>
>I think that coroutines for a recursive language are most naturally
>implemented in a language that has multiple stacks.
Silly me, and I thought I was talking about C.
Multitasking systems either give each task its own stack which is a single
big general purpose stack, or convert the stack into a tree with each task
only seeing a single unified stack.
Even if the system requires a fixed size frame, local storage can be allocated
on the heap, chained into the frame.
Like other tricks, local storage need not be implemented in particular fashion
as long as its semantics are fixed. Be careful not to confuse implementation
with interface.
----------------------------------
talk about user hostile systems:
File to include [none]?
type *none* and it aborts.
More information about the Comp.lang.c
mailing list