- 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.
- Ceph Cookbook
- Learning SAP Analytics Cloud
- Rust Cookbook
- 人人都懂設(shè)計模式:從生活中領(lǐng)悟設(shè)計模式(Python實(shí)現(xiàn))
- 數(shù)據(jù)結(jié)構(gòu)與算法分析(C++語言版)
- Node.js全程實(shí)例
- INSTANT Sinatra Starter
- Building Machine Learning Systems with Python(Second Edition)
- RESTful Java Web Services(Second Edition)
- Arduino計算機(jī)視覺編程
- Angular Design Patterns
- 基于MATLAB的控制系統(tǒng)仿真及應(yīng)用
- Mastering Drupal 8
- SQL Server 2014 Development Essentials
- D Cookbook