Retrieving the memory map of its own process in OS X 10.5/10.6

前端 未结 4 1716
陌清茗
陌清茗 2020-12-03 02:12

In Linux, the easiest way to look at a process\' memory map is looking at /proc/PID/maps, giving something like this:

08048000-08056000 r-xp 00000000         


        
4条回答
  •  悲哀的现实
    2020-12-03 02:37

    Take a look at this thread from 2007 on the Darwin-kernel mailing list. In a nutshell, your choices are to popen vmmap (which is setgid appropriately) or use the Mach VM region APIs in /usr/include/mach/mach_vm.h. I found a decent example of using the Mach API in the Sage Mathematics System sources.

提交回复
热议问题