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

前端 未结 4 1721
陌清茗
陌清茗 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:39

    A couple more links for those looking for vmmap source (it's not published):

    • http://www.newosxbook.com/src.jl?tree=listings&file=12-1-vmmap.c
    • https://code.google.com/p/psutil/source/browse/psutil/_psutil_osx.c#274 (get_process_memory_maps) and https://code.google.com/p/psutil/issues/detail?id=260

    Getting the the mapped file name and the names of libraries from dyld_shared_cache: https://stackoverflow.com/a/17180619/1026

提交回复
热议问题