Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.


Tags: c#, computer-science, .net, memory-management

Short Definition: The stack is where functions store their value type data.

See Also:

What and where are the stack and the heap?

Memory allocation: stack vs heap.

  • Each thread receives its own stack.
  • A stack contains discrete blocks of RAM memory.
  • The runtime allocates blocks to functions in first-in-first-out order.
  • On invocation, a function receives a block from the stack.
  • On return, the function gives its memory back to the stack.
  • The function uses the stack to store its local value type data.