AI engineering glossary · Computing foundations

What is stack?

Stack (also called Call stack): A region of memory that stores function call information such as local variables and return addresses, in last-in first-out order. Space is reserved automatically when a function is called and freed when it returns, and it is small compared with the heap.

Level: intermediateTopic: Computing foundations

Stack: an example

Infinite recursion keeps adding calls to the stack until a stack overflow error is raised.

Related terms

More Computing foundations terms

Where you learn it

Stack is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.