Memory Region
A program's memory usage typically includes four different regions:
- Code -- The region where the program instructions are stored.
- Static memory -- The region where global variables (variable defined outside any function) as well as static local variables (variables defined inside functions starting with the keyword "static") are allocated. The name "static" comes from these variables not changing (static means not changing); they are allocated once and last for the duration of a program's execution, their addresses staying the same.
- The stack -- The region where a function's local variables are allocated during a function call. A function call adds local variables to the stack, and a return removes them, like adding and removing dishes from a pile; hence the term "stack." Because this memory is automatically allocated and deallocated, it is also called automatic memory.
- The heap -- The region where the "new" operator allocates memory, and where the "delete" operator deallocates memory. The region is also called free store
The Following shows how them work






Memory Region的更多相关文章
- PatentTips - Maintaining shadow page tables in a sequestered memory region
BACKGROUND Malicious code, known as malware, which includes viruses, worms, adware, etc., may attack ...
- Off-heap Memory in Apache Flink and the curious JIT compiler
https://flink.apache.org/news/2015/09/16/off-heap-memory.html Running data-intensive code in the J ...
- 程序空间(Program memory)
The computer program memory is organized into the following: Data Segment (Data + BSS + Heap) Stack ...
- Embedded之memory test
1 main.c #include "led.h" #define BASE_ADDRESS (volatile datum *) 0x10000000 #define NUM_B ...
- Linker scripts之MEMORY
1 MEMORY command The MEMORY command describes the location and size of blocks of memory in the targe ...
- Anatomy of a Program in Memory
Memory management is the heart of operating systems; it is crucial for both programming and system a ...
- qualcomm memory dump 抓取方法
Memory dump是系统出现crash时常用的分析故障原因的方法,qualcomm 各子系统运行时,为方便debug,都会开辟ram log和debug variable用于保存各系统运行信息及健 ...
- [转]Anatomy of a Program in Memory
Memory management is the heart of operating systems; it is crucial for both programming and system a ...
- Linux kernel Programming - Allocating Memory
kmalloc #include <linux/slab.h> void *kmalloc(size_t size,int flags); void kfree(void *addr); ...
随机推荐
- 一个poi操作实现导出功能的类
public class ExportExcel<T> { public void exportExcel(Collection<T> dataset, OutputStrea ...
- Baidu百度搜索引擎登录网站 - Blog透视镜
Baidu百度是中国的搜索引擎,有心经营中国市场的网友,自然不能错过,不过Google谷歌已经遭中国封锁,如果你的网站是用Blogger架设的,具有blogspot.com网域的,则会无法浏览. 阅读 ...
- FJ省队集训DAY4 T1
直接上题解 #include<cstdio> #include<iostream> #include<cmath> #include<cstring> ...
- 多线程操作UI界面的示例 - 更新进度条
http://blog.csdn.net/liang19890820/article/details/52186626
- webservice的几个简单概念
1.什么是JAX-WS? http://baike.baidu.com/view/1865210.htm?fr=aladdin 2.什么是JAX-RPC? http://baike.baidu.com ...
- 充分发挥 JavaScript 语言的优势
尽管我在生产环境中使用 JavaScript 长达 8 年之久了,但是,直到最近 2 年,我才开始学习如何正确地编写 JavaScript 代码,根据我对人们的理解,很多开发者都有类似经历.我们有相当 ...
- NetAnalyzer笔记 之 二. 简单的协议分析
[创建时间:2015-08-27 22:15:17] NetAnalyzer下载地址 上篇我们回顾完了NetAnalyzer一些可有可无的历史,在本篇,我决定先不对NetAnalyzer做介绍,而是先 ...
- 阿里云安装docker
选centos6.5输入操作系统 yum install docker-io docker -d 提示没有备用IP地址可以用来桥接卡 接下来的网卡中编辑eth0 DEVICE=eth0 ONBOOT ...
- .NET基础拾遗(4)委托为何而生?
生活中的例子: 你早上要吃包子作为早饭,那么你可能让你爸爸或者妈妈帮你做,那你就会调用 爸爸.要包子() 或妈妈.要包子() 返回包子对象. 但是如果你爸妈不在家的时候,你只能去街上买,问题是你根本不 ...
- c#利用VM_COPYDATA实现进程间通信
c#进程间的通信方式很多种,只会这种,感觉比较简单.不懂原理,能用就行. 假设有两个程序:server(主进程),client(子进程) 1.server端: /*定义一个结构体,用来接收从子进程传过 ...