[erlang-questions] : Design of the Erlang VM
Thu Sep 6 12:52:25 CEST 2007
Serge Aleynikov wrote:
> Could you shed some light on how non-tail recursive calls are being
> handled in the absence of use of the processor stack?
Every Erlang process has its own stack, for storing Erlang function
call frames. It's just that it's not the same as the C call stack
(which is used by the emulator itself). The emulator code explicitly
handles the processes' stacks, storing and retreiving local variables,
saving and restoring the Beam-code program counter, incrementing and
decrementing the process' stack pointer, etc. The process stack is
basically just an array of words, to be manipulated at will.
More information about the erlang-questions