进程虚拟地址空间区域划分

进程虚拟地址空间区域划分

image

示例程序如下

#include <iostream>
int gdata1 = 10;
int gdata2 = 0;
int gdata3;
static int gdata4 = 11;
static int gdata5 = 0;
static int gdata6;
int main()
{
	int a = 12;
	int b = 0;
	int c;
	static int e = 13;
	static int f = 0;
	static int g;
	std::cout << c << g << std::endl;
}

分析图如下

image
在调试情况下可以在代码区域右键【转到反汇编】进行汇编代码的查看

posted @ 2025-09-30 18:50  焦涛  阅读(2)  评论(0)    收藏  举报