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); ...
随机推荐
- 关于取url或者微信中参数的js
今天遇到这么个情况,因为是第一次弄,所以在这里做了个记录,因为要弄过二维码的功能,要获取里面的参数并传给后台,所以要对二维码里面的地址进行过滤.刚开始是很惆怅的,因为之前没弄过,原以为可以通过spli ...
- UITableView常用属性和方法 - 永不退缩的小白菜
UITableView常用属性和方法 - 永不退缩的小白菜 时间 2014-05-27 01:21:00 博客园精华区原文 http://www.cnblogs.com/zhaofucheng11 ...
- Cmake ,Out of Source Build
Out of Source build呢,就是让Cmake产生的临时垃圾文件,不关乎于项目实际本身的文件放到一个目录里,一般我们把这个目录放在项目根目录(也可以认为是根CmakeLists.txt)下 ...
- logstash tomcat catalina.out zabbix 插件不会引起崩溃
input { file { type => "zj_api" path => ["/data01/applog_backup/zjzc_log/zj-api ...
- iotop使用
介绍 Linux下的IO统计工具如iostat, nmon等大多数是只能统计到per设备的读写情况, 如果你想知道每个进程是如何使用IO的就比较麻烦. iotop 是一个用来监视磁盘 I/O 使用状况 ...
- CH Round #53 -密室
描述 有N个密室,3种钥匙(红色,绿色,白色)和2种锁(红色,绿色),红色钥匙只能开红色的锁,绿色钥匙只能开绿色的锁,白色钥匙可以开红色的锁和绿 色的锁,一把钥匙使用一次之后会被扔掉.每个密室由一扇门 ...
- dedecms 在php7.0无法安装
dedecms 需要mysql扩展的支持!而php7.0已废弃mysql扩展.所以我讲7.0改回了5.6然后就可以顺利安装了. 总结了一个经验:没有绝对实力,不要尝试新东西
- poj 1466 Girls and Boys(二分匹配之最大独立集)
Description In the second year of the university somebody started a study on the romantic relations ...
- tomcat动态映射路径
写了一个工具类,将上传文件功能保存文件的目录移到webapps目录外面,通过动态生成xml映射文件到tomcat\conf\Catalina\localhost目录下从而实现目录映射.可以被http直 ...
- JSON解析---初识
JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式 全然独立于语言的文本格式 易于人阅读和编写 易于解析和生成 (网络传输速度快) JSON语法规则 数据在 ...