.. index:: stacks, data:stack, return:stack, stack; why 42 ? .. _stacks: Stacks ====== What is the default Stack size ? -------------------------------- ======== ================= Stack Default Size ======== ================= Data 64 Bytes Return 64 Bytes ======== ================= Can Stack Size Be Changed? -------------------------- Yes, see :ref:`kernel configurations` Why is the stack ? ------------------ = 42 ^^^^ The top of stack element is held in a register in this implementation. Even if stack is empty, this register still exists. I initialise it to 42 (the answer to everything), it gets pushed and popped, and if you loose the 42, you know that you had a stack error = 1829042247 ^^^^^^^^^^^^ Because of the stack error, some different (to 42) value has been put there. Usually, one does not know where this number comes from, but sometimes you get suspicious values. For speed reasons, there is no overflow/underflow checking while running compiled code and it helps debugging if you know that you stack gone wrong somewhere in the past.