Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 497 Bytes

File metadata and controls

25 lines (16 loc) · 497 Bytes

Stack

The stack is a special memory area used to manage code execution.

Why is it needed?

The stack is used to:

  • store temporary data
  • return from functions
  • save execution state

Why nothing works without a stack

Without a stack, it is impossible to:

  • call functions nestedly
  • handle interrupts
  • save context

Features

  • the stack grows in a specific direction
  • a stack error almost always results in a crash
  • the stack must be one of the first to be initialized