使用 VMMap 查看进程地址空间分配
VMMap is a
process virtual and physical memoryanalysis utility.
It shows abreakdownof aprocess's committed virtual memory typesas well as theamount of physical memory (working set)assigned by the operating system to those types.
整体分析
分析的是 windows10 上的一个 git bash 进程。

进程的栈区

image
在 windows 上是 .exe 或者 .dll 文件。

bash 程序的程序逻辑划分

heap 区域

free 空闲的虚拟地址空间

从上图可知
free的虚拟地址空间,被分成了32个 block。怎样管理这写 block 呢?可以用一个 free-list 的数据结构来管理。至于一个分配虚拟内存的需求,应该怎样满足,那方法可就多了。什么 first fit、best fit 等等。
本文通过使用VMMap工具,详细解析了Windows 10平台上gitbash进程的虚拟及物理内存分配情况,包括进程的栈区、堆区以及空闲虚拟地址空间的管理。
5271

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



