环境
- 操作系统:ubuntu15.04
- 物理内存:4G
测试程序
#include<stdio.h>
#include<stdlib.h>
int a;
int b=1;
main()
{
int n = 0;
char *p1 = NULL;
char *p2 = NULL;
const int s = 10;
p1 = (char*)malloc(200);
p2 = "hello";
printf("main
本文详细介绍了64位Ubuntu系统下进程的内存布局,包括pmap和/proc/pid/maps查看内存的方式,以及内存各区域如文本段、数据段、堆、栈、共享库的分布和增长规律。通过dmesg命令展示了系统启动时的相关信息。
#include<stdio.h>
#include<stdlib.h>
int a;
int b=1;
main()
{
int n = 0;
char *p1 = NULL;
char *p2 = NULL;
const int s = 10;
p1 = (char*)malloc(200);
p2 = "hello";
printf("main

被折叠的 条评论
为什么被折叠?