当前位置:网站首页>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.
边栏推荐
- 【信息检索导论】第二章 词项词典与倒排记录表
- A slide with two tables will help you quickly understand the target detection
- SSM laboratory equipment management
- Using MATLAB to realize: power method, inverse power method (origin displacement)
- 【Hide-and-Seek】《Hide-and-Seek: A Data Augmentation Technique for Weakly-Supervised Localization xxx》
- Translation of the paper "written mathematical expression recognition with bidirectionally trained transformer"
- 【Wing Loss】《Wing Loss for Robust Facial Landmark Localisation with Convolutional Neural Networks》
- [introduction to information retrieval] Chapter 1 Boolean retrieval
- Machine learning theory learning: perceptron
- 生成模型与判别模型的区别与理解
猜你喜欢
PointNet理解(PointNet实现第4步)
【TCDCN】《Facial landmark detection by deep multi-task learning》
【Mixup】《Mixup:Beyond Empirical Risk Minimization》
Use Baidu network disk to upload data to the server
传统目标检测笔记1__ Viola Jones
Using compose to realize visible scrollbar
win10+vs2017+denseflow编译
Machine learning theory learning: perceptron
@Transitional step pit
MMDetection安装问题
随机推荐
Spark SQL task performance optimization (basic)
view的绘制机制(一)
【多模态】CLIP模型
【Random Erasing】《Random Erasing Data Augmentation》
【Wing Loss】《Wing Loss for Robust Facial Landmark Localisation with Convolutional Neural Networks》
腾讯机试题
PHP returns the abbreviation of the month according to the numerical month
Use matlab to realize: chord cut method, dichotomy, CG method, find zero point and solve equation
Calculate the total in the tree structure data in PHP
Huawei machine test questions
Feeling after reading "agile and tidy way: return to origin"
Faster-ILOD、maskrcnn_ Benchmark installation process and problems encountered
ABM论文翻译
【Torch】解决tensor参数有梯度,weight不更新的若干思路
ERNIE1.0 与 ERNIE2.0 论文解读
Mmdetection installation problem
[introduction to information retrieval] Chapter 7 scoring calculation in search system
[introduction to information retrieval] Chapter II vocabulary dictionary and inverted record table
Implementation of purchase, sales and inventory system with ssm+mysql
【Ranking】Pre-trained Language Model based Ranking in Baidu Search