全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Call stack, frame?

又称: frame (stack frame) · call stack

Definition 22.3 High School Computer Science · 第 22 章 — Recursion

Each call of a function gets a frame: a region of memory holding its arguments, its local names and the place to return to. The frames of the calls not yet finished form the call stack: a call pushes a frame on top, and a return pops it.

The call stack of factorial(4) at its deepest point: six frames, the base case on top. Each frame keeps its own n until the call above it returns.
The call stack of factorial(4) at its deepest point: six frames, the base case on top. Each frame keeps its own n until the call above it returns.
在原文中阅读 →