Android进程内存映射

Posted

技术标签:

【中文标题】Android进程内存映射【英文标题】:Android process memory map 【发布时间】:2014-10-09 14:07:21 【问题描述】:

我尝试了解com.android.browser进程[下面的内存映射]中的内存区域,并有几个问题:

    对于没有路径名的地址范围,这里映射的是什么?

    有多个 [stack:xxxx] 区域,它们是线程本地的吗 堆栈?如果不是,它们是什么?他们似乎被映射到许多 分散在内存空间的不同位置。

    如果假设堆栈位于用户空间的顶部,则 用户空间内存为 2GB,其余 2GB 由内核空间占用。是 可以看到内核空间的内存映射吗?

    59eb5000-59fb5000 r-xp 00000000 00:04 3972 /dev/ashmem/dalvik-jit-code-cache (deleted) 将被视为 和代码区域一样吗?

root@android:/ # 猫 /proc/2348/maps 地址 Perm Offset Dev inode 路径名 22900000-22909000 rw-p 00000000 00:00 0 22909000-2290a000 ---p 00000000 00:00 0 2290a000-229ff000 rwxp 00000000 00:00 0 229ff000-22a00000 ---p 00000000 00:00 0 2ae00000-2ae09000 rw-p 00000000 00:00 0 2ae09000-2ae0a000 ---p 00000000 00:00 0 2ae0a000-2ae4b000 rwxp 00000000 00:00 0 2ae4b000-2ae4c000 ---p 00000000 00:00 0 2e000000-2e300000 ---p 00000000 00:00 0 2e300000-2e400000 rw-p 00000000 00:00 0 2e400000-2e700000 ---p 00000000 00:00 0 2e700000-2e800000 rw-p 00000000 00:00 0 2ee00000-2ee09000 rw-p 00000000 00:00 0 2ee09000-2ee0a000 ---p 00000000 00:00 0 2ee0a000-2ee0b000 rwxp 00000000 00:00 0 2ee0b000-2ee0c000 ---p 00000000 00:00 0 2f000000-2f100000 rw-p 00000000 00:00 0 33c00000-33d00000 rw-p 00000000 00:00 0 35d00000-35d09000 rw-p 00000000 00:00 0 35d09000-35d0a000 ---p 00000000 00:00 0 35d0a000-35dff000 rwxp 00000000 00:00 0 35dff000-35e00000 ---p 00000000 00:00 0 3a322000-3a422000 rw-p 00000000 00:00 0 3ab00000-3ab09000 rw-p 00000000 00:00 0 3ab09000-3ab0a000 ---p 00000000 00:00 0 3ab0a000-3ab0b000 rwxp 00000000 00:00 0 3ab0b000-3ab0c000 ---p 00000000 00:00 0 3fc00000-3fd00000 rw-p 00000000 00:00 0 43c00000-43d00000 rw-p 00000000 00:00 0 4b200000-4b209000 rw-p 00000000 00:00 0 4b209000-4b20a000 ---p 00000000 00:00 0 4b20a000-4b20b000 rwxp 00000000 00:00 0 4b20b000-4b20c000 ---p 00000000 00:00 0 4b800000-4b809000 rw-p 00000000 00:00 0 4b809000-4b80a000 ---p 00000000 00:00 0 4b80a000-4b80b000 rwxp 00000000 00:00 0 4b80b000-4b80c000 ---p 00000000 00:00 0 53486000-534a0000 ---p 00000000 00:00 0 534a0000-534b0000 rw-p 00000000 00:00 0 534b0000-534b6000 ---p 00000000 00:00 0 57709000-5773a000 rw-p 00000000 00:04 4053 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwhomepage-3.5/ic/news/296-167/52682000 /jpg/_52682670_jup6.jpg(已删除) 5773a000-5776b000 rw-p 00000000 00:04 4051 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwhomepage-3.5/ic/news/296-167/52688000 /jpg/_52688304_facebookimage.jpg(已删除) 5776b000-5779c000 rw-p 00000000 00:04 4050 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwhomepage-3.5/ic/news/296-167/52680000 /jpg/_52680897_kevin1_464afp.jpg(已删除) 5779c000-5779d000 ---p 00000000 00:00 0 5779d000-5789c000 rw-p 00000000 00:00 0 [堆栈:2405] 5789c000-578db000 rw-p 00000000 00:04 4041 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwhomepage-3.5/ic/spotlight-borg/336-189 /spotlight_thequeen_120511.jpg(已删除) 578ef000-57913000 rw-p 00000000 00:04 4040 /dev/ashmem/file:///data/bbench/sites/bbc/www.bbc.co.uk/img/sprite.png(已删除) 57913000-5791f000 rw-p 00000000 00:04 4039 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwhomepage-3.5/ic/news/144-81/52683000 /jpg/_52683750_011954295-1.jpg(已删除) 5791f000-57952000 rw-p 00000000 00:04 4038 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwhomepage-3.5/ic/news/304-171/52689000 /jpg/_52689400_011907423-1.jpg(已删除) 57952000-579a6000 rw-p 00000000 00:00 0 57bf6000-57c63000 rw-p 00000000 00:04 4054 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwtravel/img/ic/432-258/130322419618027417917_1.jpg (已删除) 57c63000-57c6f000 rw-p 00000000 00:04 4008 /dev/ashmem/file:///data/bbench/sites/amazon/g-ecx.images-amazon.com/images/G/01/watches/B001A62M04._V192212155_ .jpg(已删除) 57c6f000-57c7b000 rw-p 00000000 00:04 4007 /dev/ashmem/file:///data/bbench/sites/amazon/g-ecx.images-amazon.com/images/G/01/watches/B0019FP47E._V192598089_ .jpg(已删除) 57c7b000-57c87000 rw-p 00000000 00:04 4006 /dev/ashmem/file:///data/bbench/sites/amazon/g-ecx.images-amazon.com/images/G/01/watches/B000EQR6H0._V192598437_ .jpg(已删除) 57c87000-57c94000 rw-p 00000000 00:04 4004 /dev/ashmem/file:///data/bbench/sites/amazon/ecx.images-amazon.com/images/I/41cdbCsSRVL._SL135_.jpg(已删除) 57c94000-57ca6000 rw-p 00000000 00:04 4003 /dev/ashmem/file:///data/bbench/sites/amazon/ecx.images-amazon.com/images/I/51y8Ow-npiL._SL135_.jpg(已删除) 57ca6000-57cc3000 rw-p 00000000 00:04 4001 /dev/ashmem/file:///data/bbench/sites/amazon/www.amazon.com/img/navPackedSprites-US-16piv._V172849515_.png(已删除) 57cdb000-57ce8000 rw-p 00000000 00:04 4037 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwhomepage-3.5/ic/news/296-167/52689000 /gif/_52689818_c0078971-hiv_capsid_release.gif(已删除) 57ce8000-57cff000 r--s 00000000 08:01 49769 /system/fonts/DroidNaskh-Regular.ttf 57cff000-57d55000 rw-p 00000000 00:00 0 57d55000-5827b000 r--s 00000000 08:01 49793 /system/fonts/DroidSansFallback.ttf 5827b000-582cc000 r--s 00000000 08:01 49783 /system/fonts/AndroidEmoji.ttf 582cc000-582f7000 r--s 00000000 08:01 49787 /system/fonts/Lohit-Telugu.ttf 582f7000-58328000 r--s 00000000 08:01 49775 /system/fonts/Lohit-Kannada.ttf 58328000-5834b000 r--s 00000000 08:01 49768 /system/fonts/Lohit-Bengali.ttf 5834b000-5834c000 ---p 00000000 00:00 0 5834c000-5844b000 rw-p 00000000 00:00 0 [堆栈:2401] 58456000-58462000 r--s 00000000 08:01 49796 /system/fonts/AnjaliNewLipi-light.ttf 58462000-5846b000 r--s 00000000 08:01 49786 /system/fonts/DroidSansTamil-Bold.ttf 5846b000-5848a000 r--s 00000000 08:01 49777 /system/fonts/DroidSansDevanagari-Regular.ttf 5848a000-58490000 r--s 00000000 08:01 49798 /system/fonts/DroidSansGeorgian.ttf 58490000-58494000 r--s 00000000 08:01 49763 /system/fonts/DroidSansArmenian.ttf 58494000-5849d000 r--s 00000000 08:01 49799 /system/fonts/DroidSansThai.ttf 5849d000-584a5000 r--s 00000000 08:01 49779 /system/fonts/DroidSansHebrew-Bold.ttf 584a5000-584dd000 r--s 00000000 08:01 49764 /system/fonts/DroidSansEthiopic-Regular.ttf 584dd000-58504000 r--s 00000000 08:01 49791 /system/fonts/DroidNaskh-Regular-SystemUI.ttf 58504000-5852d000 rw-p 00000000 00:00 0 5852d000-5859a000 rw-p 00000000 00:04 4030 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwtravel/img/ic/432-258/130513460118259240140_1.jpg (已删除) 5859a000-58608000 rw-p 00000000 00:04 4029 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwhomepage-3.5/ic/news/432-259/52685000 /jpg/_52685906_011803887-1.jpg(已删除) 58608000-5864b000 rw-p 00000000 00:00 0 5864b000-58675000 rw-p 00000000 00:04 4000 /dev/ashmem/file:///data/bbench/sites/amazon/g-ecx.images-amazon.com/images/G/01/kindle/merch/gw /v-day2011/vday-2011-gw-04-475x360._V170102477_.png(已删除) 58675000-58676000 ---p 00000000 00:00 0 58676000-58775000 rw-p 00000000 00:00 0 [堆栈:2385] 58775000-59245000 rw-p 00000000 00:04 3983 /dev/ashmem/file:///data/bbench/mich_engin.png(已删除) 59245000-59515000 rw-s 00000000 00:04 3982 /dev/ashmem/gralloc-buffer(已删除) 59515000-597e5000 rw-s 00000000 00:04 3974 /dev/ashmem/gralloc-buffer(已删除) 597e5000-597e6000 ---p 00000000 00:00 0 597e6000-59805000 rw-p 00000000 00:00 0 [堆栈:2398] 59805000-59806000 ---p 00000000 00:00 0 59806000-59825000 rw-p 00000000 00:00 0 [堆栈:2397] 59825000-59826000 ---p 00000000 00:00 0 59826000-59845000 rw-p 00000000 00:00 0 [堆栈:2396] 59845000-59846000 ---p 00000000 00:00 0 59846000-59865000 rw-p 00000000 00:00 0 [堆栈:2395] 59865000-59866000 ---p 00000000 00:00 0 59866000-59885000 rw-p 00000000 00:00 0 [堆栈:2394] 59885000-59886000 ---p 00000000 00:00 0 59886000-598a5000 rw-p 00000000 00:00 0 [堆栈:2393] 598a5000-598a6000 ---p 00000000 00:00 0 598a6000-598c5000 rw-p 00000000 00:00 0 [堆栈:2392] 598c5000-598c6000 ---p 00000000 00:00 0 598c6000-598e5000 rw-p 00000000 00:00 0 [堆栈:2391] 598e5000-598e6000 ---p 00000000 00:00 0 598e6000-599e5000 rw-p 00000000 00:00 0 [堆栈:2383] 599e5000-59cb5000 rw-s 00000000 00:04 3971 /dev/ashmem/gralloc-buffer(已删除) 59cb5000-59cb6000 ---p 00000000 00:00 0 59cb6000-59db5000 rw-p 00000000 00:00 0 [堆栈:2378] 59db5000-59db6000 ---p 00000000 00:00 0 59db6000-59eb5000 rw-p 00000000 00:00 0 [堆栈:2377] 59eb5000-59fb5000 r-xp 00000000 00:04 3972 /dev/ashmem/dalvik-jit-code-cache(已删除) 59FB5000-59FB6000 ---p 00000000 00:00 0 59fb6000-5a0b5000 rw-p 00000000 00:00 0 [堆栈:2375] 5a0b5000-5a0b6000 ---p 00000000 00:00 0 5a0b6000-5a1b5000 rw-p 00000000 00:00 0 [堆栈:2373] 5a1b5000-5a1b9000 rw-p 00000000 00:00 0 5a1b9000-5a1ba000 ---p 00000000 00:00 0 5a1ba000-5a2b9000 rw-p 00000000 00:00 0 [堆栈:2372] 5a2b9000-5a2ba000 ---p 00000000 00:00 0 5a2ba000-5a3b9000 rw-p 00000000 00:00 0 [堆栈:2371] 5a3bd000-5a3be000 ---p 00000000 00:00 0 5a3be000-5a3dd000 rw-p 00000000 00:00 0 [堆栈:2390] 5a3dd000-5a3de000 ---p 00000000 00:00 0 5a3de000-5a3fd000 rw-p 00000000 00:00 0 [堆栈:2389] 5a3fd000-5a3fe000 ---p 00000000 00:00 0 5a3fe000-5a41d000 rw-p 00000000 00:00 0 [堆栈:2388] 5a41e000-5a42a000 rw-p 00000000 00:04 4049 /dev/ashmem/file:///data/bbench/sites/bbc/static.bbc.co.uk/wwhomepage-3.5/ic/news/144-81/52685000 /jpg/_52685275_52685269.jpg(已删除) 5a42a000-5a42e000 rw-p 00000000 00:00 0 5a430000-5a434000 rw-p 00000000 00:00 0 5a434000-5a438000 r--s 00478000 08:01 32786 /data/app/com.adobe.flashplayer-1.apk 5a438000-5a454000 rw-p 00000000 00:00 0 5a455000-5a457000 r--s 0047b000 08:01 32786 /data/app/com.adobe.flashplayer-1.apk 5a457000-5a469000 rw-p 00000000 00:04 4002 /dev/ashmem/file:///data/bbench/sites/amazon/ecx.images-amazon.com/images/I/417XQ0XwQuL._SL135_.jpg(已删除) 5a469000-5a46b000 r-xp 00000000 08:01 49468 /system/lib/hw/gralloc.default.so 5a46b000-5a46c000 r--p 00001000 08:01 49468 /system/lib/hw/gralloc.default.so 5a46c000-5a46d000 rw-p 00002000 08:01 49468 /system/lib/hw/gralloc.default.so 5a46d000-5a471000 rw-p 00000000 00:00 0 5a471000-5a472000 ---p 00000000 00:00 0 5a472000-5a491000 rw-p 00000000 00:00 0 [堆栈:2379] 5a491000-5a499000 rw-p 00000000 00:00 0 5a499000-5a4ad000 r--s 00000000 08:01 49800 /system/fonts/Roboto-Bold.ttf 5a4ad000-5a4ae000 ---p 00000000 00:00 0 5a4ae000-5a4bd000 rw-p 00000000 00:00 0 [堆栈:2374] 5a4bd000-5a4be000 ---p 00000000 00:00 0 5a4be000-5a5bd000 rw-p 00000000 00:00 0 [堆栈:2369] 5a5bd000-5a5be000 ---p 00000000 00:00 0 5a5be000-5a6bd000 rw-p 00000000 00:00 0 [堆栈:2368] 5a6bd000-5a6be000 ---p 00000000 00:00 0 5a6be000-5a7bd000 rw-p 00000000 00:00 0 [堆栈:2366] 5a7bd000-5a7be000 ---p 00000000 00:00 0 5a7be000-5a8bd000 rw-p 00000000 00:00 0 [堆栈:2365] 5a8bd000-5a8c1000 rw-p 00000000 00:00 0 5a8c1000-5a8c2000 ---p 00000000 00:00 0 5a8c2000-5a9c1000 rw-p 00000000 00:00 0 [堆栈:2367] 5a9c1000-5a9c2000 ---p 00000000 00:00 0 5a9c2000-5aac1000 rw-p 00000000 00:00 0 [堆栈:2364] 5aac1000-5aac5000 rw-p 00000000 00:00 0 5aac5000-5aac6000 ---p 00000000 00:00 0 5aac6000-5abc5000 rw-p 00000000 00:00 0 [堆栈:2361] 5abc5000-5abc9000 rw-p 00000000 00:00 0 5abc9000-5abfe000 rw-p 00000000 00:04 3952 /dev/ashmem/dalvik-aux-structure(已删除) 5abfe000-5ae8b000 r--p 00000000 08:01 17784 /data/dalvik-cache/system@app@Browser.apk@classes.dex 5ae8b000-5ae91000 r--s 00295000 08:01 49237 /system/app/Browser.apk 5ae91000-5aea2000 rw-p 00000000 00:00 0 5aea2000-5afa3000 r--s 00191000 08:01 49237 /system/app/Browser.apk 5afa3000-5afa9000 r--s 00295000 08:01 49237 /system/app/Browser.apk 5afa9000-5afaa000 r--s 00000000 00:04 2842 /dev/ashmem/SurfaceFlinger 只读堆(已删除) 5afaa000-5afae000 rw-p 00000000 00:00 0 5afae000-5afaf000 ---p 00000000 00:00 0 5afaf000-5b0ae000 rw-p 00000000 00:00 0 [堆栈:2360] 5b0ae000-5b0b2000 rw-p 00000000 00:00 0 5b0b2000-5b0b3000 ---p 00000000 00:00 0 5b0b3000-5b1b2000 rw-p 00000000 00:00 0 [堆栈:2359] 5b1b2000-5b2b0000 r--p 00000000 00:0b 2566 /dev/binder 5b2b0000-5b2b1000 ---p 00000000 00:00 0 5b2b1000-5b3b0000 rw-p 00000000 00:00 0 [堆栈:2358] 5b3b0000-5b3b4000 rw-p 00000000 00:00 0 5b3b4000-5b3b5000 ---p 00000000 00:00 0 5b3b5000-5b4b4000 rw-p 00000000 00:00 0 [堆栈:2357] 5b4b4000-5b4b8000 rw-p 00000000 00:00 0 5b4b8000-5b4b9000 ---p 00000000 00:00 0 5b4b9000-5b5b8000 rw-p 00000000 00:00 0 [堆栈:2356] 5b5b8000-5b5c0000 rw-p 00000000 00:00 0 5b5c0000-5b5c1000 ---p 00000000 00:00 0 5b5c1000-5b6c0000 rw-p 00000000 00:00 0 [堆栈:2355] 5b6c0000-5be95000 r--s 00000000 08:01 50052 /system/usr/icu/icudt48l.dat 5be95000-5bf0c000 r--s 00000000 08:01 50060 /system/usr/share/zoneinfo/zoneinfo.dat 5bf0c000-5c5b3000 r-xp 00000000 08:01 49555 /system/lib/libwebcore.so 5c5b3000-5c5b4000 ---p 00000000 00:00 0 5c5b4000-5c62c000 r--p 006a7000 08:01 49555 /system/lib/libwebcore.so 5c62c000-5c638000 rw-p 0071f000 08:01 49555 /system/lib/libwebcore.so 5c638000-5c660000 rw-p 00000000 00:00 0 5c660000-5c76f000 r-xp 00000000 08:01 49529 /system/lib/libbcinfo.so 5c76f000-5c770000 ---p 00000000 00:00 0 5c770000-5c774000 r--p 0010f000 08:01 49529 /system/lib/libbcinfo.so 5c774000-5c775000 rw-p 00113000 08:01 49529 /system/lib/libbcinfo.so 5c775000-5cbda000 r-xp 00000000 08:01 49549 /system/lib/libbcc.so 5cbda000-5cc03000 r--p 00464000 08:01 49549 /system/lib/libbcc.so 5cc03000-5cc05000 rw-p 0048d000 08:01 49549 /system/lib/libbcc.so 5cc05000-5cc28000 rw-p 00000000 00:00 0 5cc28000-5cca9000 r-xp 00000000 08:01 49554 /system/lib/libRS.so 5cca9000-5ccaa000 ---p 00000000 00:00 0 5ccaa000-5ccac000 r--p 00081000 08:01 49554 /system/lib/libRS.so 5ccac000-5ccad000 rw-p 00083000 08:01 49554 /system/lib/libRS.so 5ccad000-5ccb3000 r-xp 00000000 08:01 49573 /system/lib/librs_jni.so 5ccb3000-5ccb4000 r--p 00005000 08:01 49573 /system/lib/librs_jni.so 5ccb4000-5ccb5000 rw-p 00006000 08:01 49573 /system/lib/librs_jni.so 5ccb6000-5ccc3000 r-xp 00000000 08:01 49522 /system/lib/libandroid.so 5ccc3000-5ccc5000 r--p 0000c000 08:01 49522 /system/lib/libandroid.so 5ccc5000-5ccc6000 rw-p 00000000 00:00 0 5ccc6000-5ccd2000 r-xp 00000000 08:01 49423 /system/lib/libstagefright_amrnb_common.so 5ccd2000-5ccd3000 r--p 0000b000 08:01 49423 /system/lib/libstagefright_amrnb_common.so 5ccd3000-5ccd4000 rw-p 00000000 00:00 0 5ccd4000-5cce5000 r-xp 00000000 08:01 49425 /system/lib/libmtp.so 5cce5000-5cce7000 r--p 00010000 08:01 49425 /system/lib/libmtp.so 5cce7000-5cce8000 rw-p 00000000 00:00 0 5cce8000-5ce7d000 r-xp 00000000 08:01 49422 /system/lib/libchromium_net.so 5ce7d000-5ce8a000 r--p 00194000 08:01 49422 /system/lib/libchromium_net.so 5ce8a000-5ce8b000 rw-p 001a1000 08:01 49422 /system/lib/libchromium_net.so 5ce8b000-5ce9d000 rw-p 00000000 00:00 0 5ce9d000-5ceb5000 r-xp 00000000 08:01 49589 /system/lib/libvorbisidec.so 5ceb5000-5ceb6000 r--p 00017000 08:01 49589 /system/lib/libvorbisidec.so 5ceb6000-5ceb7000 rw-p 00018000 08:01 49589 /system/lib/libvorbisidec.so 5ceb7000-5cec9000 r-xp 00000000 08:01 49491 /system/lib/libstagefright_omx.so 5cec9000-5cecb000 r--p 00011000 08:01 49491 /system/lib/libstagefright_omx.so 5cecb000-5cecc000 rw-p 00013000 08:01 49491 /system/lib/libstagefright_omx.so 5cecc000-5cee0000 r-xp 00000000 08:01 49534 /system/lib/libdrmframework.so 5cee0000-5cee3000 r--p 00013000 08:01 49534 /system/lib/libdrmframework.so 5cee3000-5cee4000 rw-p 00000000 00:00 0 5cee4000-5cfc4000 r-xp 00000000 08:01 49484 /system/lib/libstagefright.so 5cfc4000-5cfc5000 ---p 00000000 00:00 0 5cfc5000-5cfcb000 r--p 000e0000 08:01 49484 /system/lib/libstagefright.so 5cfcb000-5cfcc000 rw-p 000e6000 08:01 49484 /system/lib/libstagefright.so 5cfcc000-5cff4000 r-xp 00000000 08:01 49512 /system/lib/libmedia_jni.so 5cff4000-5cff5000 ---p 00000000 00:00 0 5cff5000-5cff6000 r--p 00028000 08:01 49512 /system/lib/libmedia_jni.so 5cff6000-5cff7000 rw-p 00029000 08:01 49512 /system/lib/libmedia_jni.so 5cff7000-5d00b000 r--s 00000000 08:01 49789 /system/fonts/Roboto-Regular.ttf 5d00b000-5d03b000 rw-p 00000000 00:00 0 5d03b000-5d50f000 r--s 00336000 08:01 49813 /system/framework/framework-res.apk 5d50f000-5d53f000 r--s 00829000 08:01 49813 /system/framework/framework-res.apk 5d540000-5d548000 rw-s 00000000 08:01 50110 /data/data/com.android.browser/databases/browser2.db-shm 5d548000-5d550000 rw-p 00000000 00:00 0 5d550000-5d551000 ---p 00000000 00:00 0 5d551000-5d650000 rw-p 00000000 00:00 0 [堆栈:2354] 5d650000-5d654000 rw-p 00000000 00:00 0 5d654000-5d655000 ---p 00000000 00:00 0 5d655000-5d754000 rw-p 00000000 00:00 0 [堆栈:2353] 5d754000-5d758000 rw-p 00000000 00:00 0 5d758000-5d759000 ---p 00000000 00:00 0 5d759000-5d858000 rw-p 00000000 00:00 0 [堆栈:2351] 5d858000-5e02d000 r--s 00000000 08:01 50052 /system/usr/icu/icudt48l.dat 5e02d000-5e061000 r-xp 00000000 08:01 49502 /system/lib/libjavacore.so 5e061000-5e062000 r--p 00033000 08:01 49502 /system/lib/libjavacore.so 5e062000-5e064000 rw-p 00034000 08:01 49502 /system/lib/libjavacore.so 5e064000-5e07c000 rw-p 00000000 00:04 2802 /dev/ashmem/dalvik-aux-structure(已删除) 5e07c000-5e1cd000 r--p 00000000 08:01 17699 /data/dalvik-cache/system@framework@apache-xml.jar@classes.dex 5e1cd000-5e1cf000 r--s 00085000 08:01 49807 /system/framework/apache-xml.jar 5e1d0000-5e1d4000 rw-p 00000000 00:00 0 5e1d4000-5e1dc000 r-xp 00000000 08:01 49417 /system/lib/libexif.so 5e1dc000-5e1dd000 ---p 00000000 00:00 0 5e1dd000-5e1de000 r--p 00008000 08:01 49417 /system/lib/libexif.so 5e1de000-5e1df000 rw-p 00009000 08:01 49417 /system/lib/libexif.so 5e1df000-5e1e0000 rw-p 00000000 00:00 0 5e1e0000-5e206000 rw-p 00000000 00:04 2801 /dev/ashmem/dalvik-aux-structure(已删除) 5e206000-5e42e000 r--p 00000000 08:01 17698 /data/dalvik-cache/system@framework@services.jar@classes.dex 5e42e000-5e47c000 r--p 00000000 08:01 17697 /data/dalvik-cache/system@framework@android.policy.jar@classes.dex 5e47c000-5e47d000 r--s 0001f000 08:01 49810 /system/framework/android.policy.jar 5e47e000-5e483000 rw-p 00000000 00:00 0 5e483000-5e484000 r--p 00000000 00:00 0 5e484000-5e489000 r-xp 00000000 08:01 49504 /system/lib/libstagefright_avc_common.so 5e489000-5e48a000 r--p 00004000 08:01 49504 /system/lib/libstagefright_avc_common.so 5e48a000-5e48b000 rw-p 00000000 00:00 0 5e48b000-5e48c000 r-xp 00000000 08:01 49566 /system/lib/libstagefright_enc_common.so 5e48c000-5e48d000 r--p 00000000 08:01 49566 /system/lib/libstagefright_enc_common.so 5e48d000-5e48e000 rw-p 00000000 00:00 0 5e48e000-5e55e000 rw-p 00000000 00:04 2797 /dev/ashmem/dalvik-aux-structure(已删除) 5e55e000-5f033000 r--p 00000000 08:01 17696 /data/dalvik-cache/system@framework@framework.jar@classes.dex 5f033000-5f04f000 rw-p 00000000 00:04 2796 /dev/ashmem/dalvik-aux-structure(已删除) 5f04f000-5f1be000 r--p 00000000 08:01 17695 /data/dalvik-cache/system@framework@ext.jar@classes.dex 5f1be000-5f1d0000 r--s 000f7000 08:01 49815 /system/framework/ext.jar 5f1d0000-5f2c0000 r--p 00000000 08:01 17694 /data/dalvik-cache/system@framework@bouncycastle.jar@classes.dex 5f2c0000-5f2c1000 r--s 00057000 08:01 49814 /system/framework/bouncycastle.jar 5f2c1000-5f2c3000 r-xp 00000000 08:01 49476 /system/lib/libstagefright_yuv.so 5f2c3000-5f2c4000 r--p 00001000 08:01 49476 /system/lib/libstagefright_yuv.so 5f2c4000-5f2c5000 rw-p 00000000 00:00 0 5f2c5000-5f2c9000 rw-p 00000000 00:00 0 5f2c9000-5f2ca000 r--s 000e3000 08:01 49820 /system/framework/services.jar 5f2ca000-5f2d2000 rw-p 00000000 00:04 2800 /dev/ashmem/dalvik-aux-structure(已删除) 5f2d2000-5f2d3000 rw-p 00000000 00:04 2794 /dev/ashmem/dalvik-aux-structure(已删除) 5f2d3000-5f2da000 r--p 00000000 08:01 17693 /data/dalvik-cache/system@framework@core-junit.jar@classes.dex 5f2da000-5f2db000 r--s 00002000 08:01 49826 /system/framework/core-junit.jar 5f2db000-5f314000 rw-p 00000000 00:04 2790 /dev/ashmem/dalvik-aux-structure(已删除) 5f314000-5f652000 r--p 00000000 08:01 17692 /data/dalvik-cache/system@framework@core.jar@classes.dex 5f652000-5f653000 r--s 0013a000 08:01 49819 /system/framework/core.jar 5f653000-5f654000 r--s 0041b000 08:01 49825 /system/framework/framework.jar 5f654000-5f664000 rw-p 00000000 00:04 2795 /dev/ashmem/dalvik-aux-structure(已删除) 5f664000-5f665000 ---p 00000000 00:04 2786 /dev/ashmem/dalvik-LinearAlloc(已删除) 5f665000-5f90a000 rw-p 00001000 00:04 2786 /dev/ashmem/dalvik-LinearAlloc(已删除) 5f90a000-5f94e000 rw-p 002a6000 00:04 2786 /dev/ashmem/dalvik-LinearAlloc(已删除) 5f94e000-60664000 ---p 002ea000 00:04 2786 /dev/ashmem/dalvik-LinearAlloc(已删除) 60664000-6066a000 rw-p 00000000 00:00 0 6066a000-6086b000 rw-p 00000000 00:04 2785 /dev/ashmem/dalvik-card-table(已删除) 6086b000-65dc1000 rw-p 00000000 00:04 2784 /dev/ashmem/dalvik-mark-stack(已删除) 65dc1000-661c1000 rw-p 00000000 00:04 2783 /dev/ashmem/dalvik-bitmap-2(已删除) 661c1000-665c1000 rw-p 00000000 00:04 2782 /dev/ashmem/dalvik-bitmap-1(已删除) 665c1000-66be3000 rw-p 00000000 00:04 2781 /dev/ashmem/dalvik-heap(已删除) 66be3000-66d43000 rw-p 00622000 00:04 2781 /dev/ashmem/dalvik-heap(已删除) 66d43000-765c1000 ---p 00782000 00:04 2781 /dev/ashmem/dalvik-heap(已删除) 765c1000-765c2000 r--p 00000000 00:00 0 765c2000-765ca000 r--s 00000000 00:0b 1945 /dev/__properties__(已删除) 765ca000-765fd000 r-xp 00000000 08:01 49574 /system/lib/libharfbuzz.so 765fd000-765fe000 r--p 00032000 08:01 49574 /system/lib/libharfbuzz.so 765fe000-765ff000 rw-p 00000000 00:00 0 765ff000-76601000 r-xp 00000000 08:01 49432 /system/lib/libusbhost.so 76601000-76602000 r--p 00001000 08:01 49432 /system/lib/libusbhost.so 76602000-76603000 rw-p 00000000 00:00 0 76603000-76604000 r-xp 00000000 08:01 49436 /system/lib/libmedia_native.so 76604000-76605000 r--p 00000000 08:01 49436 /system/lib/libmedia_native.so 76605000-76606000 rw-p 00000000 00:00 0 76606000-76609000 r-xp 00000000 08:01 49521 /system/lib/libspeexresampler.so 76609000-7660a000 r--p 00002000 08:01 49521 /system/lib/libspeexresampler.so 7660a000-7660b000 rw-p 00003000 08:01 49521 /system/lib/libspeexresampler.so 7660b000-7660d000 r-xp 00000000 08:01 49580 /system/lib/libaudioutils.so 7660d000-7660e000 r--p 00001000 08:01 49580 /system/lib/libaudioutils.so 7660e000-7660f000 rw-p 00000000 00:00 0 7660f000-76619000 r-xp 00000000 08:01 49452 /system/lib/libstagefright_foundation.so 76619000-7661a000 ---p 00000000 00:00 0 7661a000-7661b000 r--p 0000a000 08:01 49452 /system/lib/libstagefright_foundation.so 7661b000-7661c000 rw-p 0000b000 08:01 49452 /system/lib/libstagefright_foundation.so 7661c000-7667a000 r-xp 00000000 08:01 49490 /system/lib/libmedia.so 7667a000-7667b000 ---p 00000000 00:00 0 7667b000-7668b000 r--p 0005e000 08:01 49490 /system/lib/libmedia.so 7668b000-7668c000 rw-p 0006e000 08:01 49490 /system/lib/libmedia.so 7668c000-766be000 r-xp 00000000 08:01 49513 /system/lib/libssl.so 766be000-766bf000 ---p 00000000 00:00 0 766bf000-766c1000 r--p 00032000 08:01 49513 /system/lib/libssl.so 766c1000-766c4000 rw-p 00034000 08:01 49513 /system/lib/libssl.so 766c4000-76788000 r-xp 00000000 08:01 49487 /system/lib/libcrypto.so 76788000-76789000 ---p 00000000 00:00 0 76789000-76795000 r--p 000c4000 08:01 49487 /system/lib/libcrypto.so 76795000-7679b000 rw-p 000d0000 08:01 49487 /system/lib/libcrypto.so ... 76ed1000-76ed2000 rw-p 00000000 00:00 0 76ed2000-76eea000 r-xp 00000000 08:01 49418 /system/lib/libutils.so 76eea000-76eeb000 r--p 00017000 08:01 49418 /system/lib/libutils.so 76eeb000-76eec000 rw-p 00018000 08:01 49418 /system/lib/libutils.so 76eec000-76efb000 r-xp 00000000 08:01 49462 /system/lib/libcutils.so 76efb000-76efc000 r--p 0000e000 08:01 49462 /system/lib/libcutils.so 76efc000-76efd000 rw-p 0000f000 08:01 49462 /system/lib/libcutils.so 76efd000-76f0b000 rw-p 00000000 00:00 0 76f0b000-76f20000 r-xp 00000000 08:01 49424 /system/lib/libm.so 76f20000-76f21000 r--p 00014000 08:01 49424 /system/lib/libm.so 76f21000-76f22000 rw-p 00000000 00:00 0 76f22000-76f23000 r-xp 00000000 08:01 49474 /system/lib/libstdc++.so 76f23000-76f24000 r--p 00000000 08:01 49474 /system/lib/libstdc++.so 76f24000-76f25000 rw-p 00000000 00:00 0 76f25000-76f68000 r-xp 00000000 08:01 49489 /system/lib/libc.so 76f68000-76f6b000 rw-p 00043000 08:01 49489 /system/lib/libc.so 76f6b000-76f76000 rw-p 00000000 00:00 0 76f76000-76f79000 r-xp 00000000 08:01 49505 /system/lib/liblog.so 76f79000-76f7a000 r--p 00002000 08:01 49505 /system/lib/liblog.so 76f7a000-76f7b000 rw-p 00003000 08:01 49505 /system/lib/liblog.so 76f7b000-76f8e000 r-xp 00000000 08:01 49277 /system/bin/linker 76f8e000-76f8f000 r--p 00012000 08:01 49277 /system/bin/linker 76f8f000-76f90000 rw-p 00013000 08:01 49277 /system/bin/linker 76f90000-76f9c000 rw-p 00000000 00:00 0 76f9c000-76f9e000 r-xp 00000000 08:01 49334 /system/bin/app_process 76f9e000-76f9f000 r--p 00001000 08:01 49334 /system/bin/app_process 76f9f000-76fa0000 rw-p 00000000 00:00 0 772af000-773f8000 rw-p 00000000 00:00 0 [堆] 773f8000-77bf0000 rw-p 00000000 00:00 0 [堆] 7ec4f000-7ec70000 rw-p 00000000 00:00 0 [堆栈] ffff0000-ffff1000 r-xp 00000000 00:00 0 [矢量]

【问题讨论】:

【参考方案1】:

(1) 未命名的区域可以是任何东西。例如,dlmalloc 实现将使用 mmap() 分配大区域(其中“大”是可配置的;可能是 64K 或 256K)。

(2) [stack:xxxx] 堆栈是指定线程的线程堆栈;每个都是 1MB,带有一个保护页面来捕获溢出/欠载。它们不会都是连续的,因为并非所有线程都同时启动。

(3) 内核从 0xc0000000 开始。 ASLR 会导致事物的放置有些随机。有多种工具可用于查看 Linux 内核。

(4) dalvik-jit-code-cache 是可执行代码。请注意设置了“x”(执行)标志。

【讨论】:

感谢法登!您能否提及一些用于研究 Linux 内核的工具?我发现以下 ARM Linux 似乎与 [vectors] 部分匹配。arm.linux.org.uk/developer/memory.txt 对于显示的内存映射,“norandmaps”启动选项已打开以防止 ASLR。

以上是关于Android进程内存映射的主要内容,如果未能解决你的问题,请参考以下文章

033 Android多进程-共享内存

Android跨进程通信-共享内存

Android之Binder通信篇

android内存管理

Android跨进程通信-mmap函数

Android 进阶——系统启动之Android init进程的创建和启动