V2EX call stack

Call Stack

Definition / 定义

调用栈:程序运行时用来管理函数(或方法)调用顺序的一块内存结构。每次调用函数会创建一个“栈帧(stack frame)”并压入栈中;函数返回时对应栈帧弹出。它常用于保存返回地址、参数、局部变量等信息。也常用来指“栈追踪/调用链”(例如错误信息里的调用顺序)。

Pronunciation / 发音

/kl stk/

Examples / 例句

The call stack shows which function is running now.
调用栈会显示当前正在运行的是哪个函数。

When the program crashed, the debugger printed a call stack that traced the error back through several nested function calls.
程序崩溃时,调试器打印出一份调用栈,沿着多层嵌套的函数调用把错误追溯到源头。

Etymology / 词源

“Call stack”由 call(调用) + stack(栈) 组成:call 表示“调用某个函数/过程”,stack 指“后进先出(LIFO)”的数据结构。组合起来就形象地表达了“函数调用按栈的方式进出”的运行机制。该术语随现代编程语言与操作系统的普及而广泛使用。

Related Words / 相关词

Literary Works / 著名作品

  • Computer Systems: A Programmer’s Perspective(Randal E. Bryant, David R. O’Hallaron)讲解过程调用、栈帧与调用栈在体系结构层面的实现
  • The C Programming Language(Brian W. Kernighan, Dennis M. Ritchie)涉及函数调用与栈相关概念(虽不总以“call stack”作为固定词组呈现)
  • Structure and Interpretation of Computer Programs(Harold Abelson, Gerald Jay Sussman)讨论过程调用与求值模型,常引出对调用栈/控制栈的理解
  • Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems(David J. Agans)调试实践中经常使用“stack trace / call stack”来定位错误
关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     3936 人在线   最高记录 6679       Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 7ms UTC 05:11 PVG 13:11 LAX 22:11 JFK 01:11
Do have faith in what you're doing.
ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86