码迷,mamicode.com
首页 > 其他好文 > 详细

Stack frame

时间:2017-11-23 16:34:55      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:action   inf   oca   nes   ace   and   variables   call   run   

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 parameterslocal 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

标签:action   inf   oca   nes   ace   and   variables   call   run   

原文地址:http://www.cnblogs.com/feng9exe/p/7885231.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!