Call stack

This article needs a technical review. How you can help.

A call stack is a mechanism for an interpreter to keep track of its place in a script that calls functions from within functions.

  • When a script calls a function, the interpreter adds its current place to the call stack as a return address, and then starts carrying out the function.
  • When the function is finished, the interpreter takes the most recent return address off the stack and resumes execution where the return address indicates.
  • If the stack takes up more space than assigned to it, it results in a "stack overflow" error.

Learn more

General knowledge

Document Tags and Contributors

 Contributors to this page: klez, SnehJain, Andrew_Pfeiffer
 Last updated by: klez,