- Mastering C++ Multithreading
- Maya Posch
- 168字
- 2021-07-15 17:33:58
The stack
As we saw in the preceding sections, the stack together with the CPU registers define a task. As mentioned earlier, this stack consists of stack frames, each of which defines the (local) variables, parameters, data, and instructions for that particular instance of task execution. Of note is that although the stack and stack frames are primarily a software concept, it is an essential feature of any modern OS, with hardware support in many CPU instruction sets. Graphically, it can be be visualized like the following:

The SP (ESP on x86) points to the top of the stack, with another pointer (Extended Base Pointer (EBP) for x86). Each frame contains a reference to the preceding frame (caller return address), as set by the OS.
When using a debugger with one's C++ application, this is basically what one sees when requesting the backtrack--the individual frames of the stack showing the initial stack frame leading up until the current frame. Here, one can examine each individual frame's details.
- Java語言程序設計
- Beginning Java Data Structures and Algorithms
- 單片機C語言程序設計實訓100例:基于STC8051+Proteus仿真與實戰
- 微服務設計原理與架構
- 營銷數據科學:用R和Python進行預測分析的建模技術
- Java程序設計與實踐教程(第2版)
- GeoServer Beginner's Guide(Second Edition)
- Learning Laravel's Eloquent
- C++寶典
- Creating Data Stories with Tableau Public
- 從零開始:UI圖標設計與制作(第3版)
- 跟戴銘學iOS編程:理順核心知識點
- Offer來了:Java面試核心知識點精講(框架篇)
- 企業級Java現代化:寫給開發者的云原生簡明指南
- micro:bit軟件指南