当前位置:网站首页>Memory model of program
Memory model of program
2022-07-02 07:40:00 【Xiao Chen who wants money】
Memory partition model .
Memory is divided into 4 Regions , They are code areas , Global area , The stack area , Heap area .
When a process starts , There are the following assignments 4 Regions .
( One ) Code area and global area
After the program is compiled , Will generate a exe Executable program of , Before the program is executed, it is divided into two areas , Code area and global area .
Code section
- Store the binary code of the function body , Managed by the operating system .
- Deposit CPU Machine instructions executed .
- The code area is share Of , The purpose of sharing is for programs that are frequently executed , Just have a code in memory , Remove redundant code .
- The code area is read-only Of , The purpose of read-only is to prevent the program from being modified by its instructions .
Global area
Store global variables and static variables (static int a), Contains the constant area ,( String constant , Other constants const Decorated variable )
const The decorated global variables are placed in the global area ,const The decorated local variables are placed in the code area .
The stack area :
Stored is the return address of the subroutine 、 Parameters of subroutine 、 And the local variables of the program .
Heap area :
Store dynamically allocated data for example :new and malloc.
边栏推荐
- [paper introduction] r-drop: regulated dropout for neural networks
- [CVPR‘22 Oral2] TAN: Temporal Alignment Networks for Long-term Video
- Implementation of yolov5 single image detection based on onnxruntime
- Convert timestamp into milliseconds and format time in PHP
- 【BERT,GPT+KG调研】Pretrain model融合knowledge的论文集锦
- 【Paper Reading】
- [Bert, gpt+kg research] collection of papers on the integration of Pretrain model with knowledge
- PHP uses the method of collecting to insert a value into the specified position in the array
- ABM thesis translation
- [introduction to information retrieval] Chapter 3 fault tolerant retrieval
猜你喜欢
Sorting out dialectics of nature
MMDetection安装问题
ModuleNotFoundError: No module named ‘pytest‘
Use Baidu network disk to upload data to the server
Using MATLAB to realize: Jacobi, Gauss Seidel iteration
使用Matlab实现:Jacobi、Gauss-Seidel迭代
Alpha Beta Pruning in Adversarial Search
使用MAME32K进行联机游戏
Faster-ILOD、maskrcnn_benchmark安装过程及遇到问题
【Ranking】Pre-trained Language Model based Ranking in Baidu Search
随机推荐
Ding Dong, here comes the redis om object mapping framework
Determine whether the version number is continuous in PHP
Calculate the total in the tree structure data in PHP
Faster-ILOD、maskrcnn_benchmark安装过程及遇到问题
基于onnxruntime的YOLOv5单张图片检测实现
Interpretation of ernie1.0 and ernie2.0 papers
[introduction to information retrieval] Chapter 6 term weight and vector space model
解决latex图片浮动的问题
Classloader and parental delegation mechanism
[medical] participants to medical ontologies: Content Selection for Clinical Abstract Summarization
ABM论文翻译
[introduction to information retrieval] Chapter 1 Boolean retrieval
PPT的技巧
[introduction to information retrieval] Chapter 3 fault tolerant retrieval
ModuleNotFoundError: No module named ‘pytest‘
【论文介绍】R-Drop: Regularized Dropout for Neural Networks
Calculate the difference in days, months, and years between two dates in PHP
[model distillation] tinybert: distilling Bert for natural language understanding
Feeling after reading "agile and tidy way: return to origin"
ModuleNotFoundError: No module named ‘pytest‘