1. 程式人生 > >Stack frame

Stack frame

other frame allow tro contain sed rem link mat

http://en.citizendium.org/wiki/Stack_frame

In computer science, a stack frame is a memory management strategy used to create and destroy temporary (automatic) variables in some programming languages. Among other things, use of a stack allows programming languages to allow recursive calling of subroutines. Stack frames only exist at run-time.

When a program runs, it is called a process, and it starts with one thread (which may create additional threads). Stacks are per thread, and each thread‘s stack adds a new stack frame whenever a procedure (or function or subroutine or method) is invoked. Each stack frame contains space for actual parameters, local variables, temporary locations, and (in some architectures) information about the calling context such as the memory address of the calling subroutine[1]

. When the called procedure finishes executing, its stack frame is removed from the stack, and thread execution resumes back in the calling procedure.

Stack frame