Understanding Linux /proc/id/maps
来源:互联网 发布:免费淘宝联盟推广软件 编辑:程序博客网 时间:2024/04/30 12:39
Each row in /proc/$PID/maps describes a region of contiguous virtual memory in a process or thread. Each row has the following fields:
address perms offset dev inode pathname
08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm
address - This is the starting and ending address of the region in the process's address space
permissions - This describes how pages in the region can be accessed. There are four different permissions: read, write, execute, and shared. If read/write/execute are disabled, a '-' will appear instead of the 'r'/'w'/'x'. If a region is not shared, it is private, so a 'p' will appear instead of an 's'. If the process attempts to access memory in a way that is not permitted, a segmentation fault is generated. Permissions can be changed using the mprotect system call.
offset - If the region was mapped from a file (using mmap), this is the offset in the file where the mapping begins. If the memory was not mapped from a file, it's just 0.
device - If the region was mapped from a file, this is the major and minor device number (in hex) where the file lives.
inode - If the region was mapped from a file, this is the file number.
pathname - If the region was mapped from a file, this is the name of the file. This field is blank for anonymous mapped regions. There are also special regions with names like [heap], [stack], or [vdso]. [vdso] stands for virtual dynamic shared object. It's used by system calls to switch to kernel mode. Here's a good article about it.
You might notice a lot of anonymous regions. These are usually created by mmap but are not attached to any file. They are used for a lot of miscellaneous things like shared memory or buffers not allocated on the heap. For instance, I think the pthread library uses anonymous mapped regions as stacks for new threads.
- Understanding Linux /proc/id/maps
- Understanding Linux /proc/id/maps
- Understanding Linux /proc/id/maps
- Understanding Linux /proc/cpuinfo
- linux proc maps文件分析
- linux proc maps文件分析
- linux proc maps文件分析
- /proc/maps
- (转载) Linux下 /proc/maps 文件分析
- Linux下 /proc/maps 文件分析
- Linux下 /proc/maps 文件分析
- (转载) Linux下 /proc/maps 文件分析
- (转载) Linux下 /proc/maps 文件分析
- Linux下 /proc/maps 文件分析
- linux /proc/pid/maps 信息分析
- Linux下 /proc/maps 文件分析
- linux /proc/pid/maps 信息分析
- linux /proc/pid/maps 信息分析
- 使用Visual Studio对项目重命名
- 启动控制面板中的applet时的一点笔记--发文于2013-10-22
- 《侣行》三季合集下载
- RMI AND CORBA简介——java菜鸟成长记
- 触发器类 , 指针函数
- Understanding Linux /proc/id/maps
- 关于幂等的设计
- 哈希查找之链地址法解决冲突(代码封装实现)
- 常用的正则表达式验证
- iOSCore Location地理定位的简单实用
- ubuntu 14.04 改网卡IP为静态IP
- MySQL高级十六——内存优化
- Save could not be completed. Reason: some characters cannot be mapped using “ISO-8859-1“
- com的小笔记--发文于2013-10-24