- Expert C++
- Vardan Grigoryan Shunguang Wu
- 262字
- 2021-06-24 16:33:57
Working with data
When we refer to computer memory, we consider the Random Access Memory (RAM) by default, and also the RAM is a general term for either SRAM or DRAM; we will mean DRAM by default unless otherwise stated. To clear things out, let's take a look at the following diagram, which illustrates the memory hierarchy:
When we compile a program, the compiler stores the final executable file in the hard drive. To run the executable file, its instructions are loaded into the RAM and are then executed by the CPU one by one. This leads us to the conclusion that any instruction required to be executed should be in the RAM. This is partially true. The environment that is responsible for running and monitoring programs plays the main role.
Programs we write are executed in the hosted environment, which is in the OS. The OS loads the contents of the program (its instructions and data, that is, the process) not directly into the RAM, but the virtual memory, a mechanism that makes it possible both to handle processes conveniently and to share resources between processes. Whenever we refer to the memory that a process is loaded to, we mean the virtual memory, which in turn maps its contents to the RAM.
Let's begin with an introduction to the memory structure and then investigate data types within the memory.
- 新編Visual Basic程序設(shè)計(jì)上機(jī)實(shí)驗(yàn)教程
- 微信公眾平臺(tái)與小程序開發(fā):從零搭建整套系統(tǒng)
- C語(yǔ)言程序設(shè)計(jì)案例教程(第2版)
- C語(yǔ)言程序設(shè)計(jì)(第3版)
- Python深度學(xué)習(xí)
- Java從入門到精通(第4版)
- oreilly精品圖書:軟件開發(fā)者路線圖叢書(共8冊(cè))
- Learning Laravel 4 Application Development
- 劍指MySQL:架構(gòu)、調(diào)優(yōu)與運(yùn)維
- MATLAB 2020從入門到精通
- 51單片機(jī)C語(yǔ)言開發(fā)教程
- 計(jì)算機(jī)應(yīng)用基礎(chǔ)教程(Windows 7+Office 2010)
- Learning Node.js for .NET Developers
- Go語(yǔ)言開發(fā)實(shí)戰(zhàn)(慕課版)
- 算法圖解