Stack Memory
Noun · Development
Definitions
A region of memory allocated per thread that grows and shrinks in LIFO (last-in, first-out) order as functions are called and return. It is managed automatically by the CPU's stack pointer, is extremely fast to allocate from, but is limited in size (typically 1–8 MB) and unsuitable for data that must outlive the current function call.
In plain English: A small, fast section of memory that each thread uses for temporary data during function calls, automatically cleaned up when functions return.
Example: "We got a stack overflow because the recursive parser blew through the 1 MB default stack on a deeply nested JSON document."