V2EX  ›  英汉词典

Stack Frame

释义 Definition

stack frame(栈帧):在程序运行时,调用一个函数/过程时在调用栈(call stack)上分配的一段数据区域,用来保存该次调用所需的信息,例如参数、局部变量、返回地址、保存的寄存器、上一层栈帧指针等。(也常被称为 activation record。)

发音 Pronunciation (IPA)

/ˈstæk freɪm/

例句 Examples

The debugger shows a new stack frame every time the function is called.
调试器会在每次函数被调用时显示一个新的栈帧。

When the program crashed, the stack trace revealed corrupted stack frames, suggesting a buffer overflow in a deeply nested call.
程序崩溃时,栈追踪显示栈帧被破坏,这暗示在深层嵌套调用中发生了缓冲区溢出。

词源 Etymology

stack 原意为“堆叠”,在计算机中指按“后进先出(LIFO)”方式管理的内存结构;frame 原意为“框架/框”,引申为“把一次函数调用所需的数据‘框’起来的一块区域”。组合成 stack frame,直观表达“调用栈上的一格/一层记录”。

相关词 Related Words

文学与著作 Notable Works

  • Computer Systems: A Programmer’s Perspective(Randal E. Bryant, David R. O’Hallaron)——讲解过程调用、栈帧布局与栈溢出等。
  • The C Programming Language(Kernighan & Ritchie)——涉及函数调用与局部变量等,为理解栈帧打基础。
  • Debugging with GDB(FSF 文档)——使用调试器查看 stack frame、回溯(backtrace)与栈信息。
  • System V ABI(如 x86-64 psABI 文档)——规定调用约定与栈帧/寄存器保存规则(不同平台略有差异)。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2128 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 11:28 · PVG 19:28 · LAX 03:28 · JFK 06:28
♥ Do have faith in what you're doing.