문서 보기이전 판역링크맨 위로 이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. CC: https://community.freescale.com/docs/DOC-93326 **Check memory leakage in media server.** Set libc debug level. So libc will record back trace for all memory allocate. * setprop libc.debug.malloc 1 Kill mediaserver to let the libc debug take effect. Android will restart mediaserver. * busybox killall -HUP mediaserver you will see below log if you setting right. <code> I/libc ( 3074): /system/bin/mediaserver using MALLOC_DEBUG = 1 (leak checker) Dump all used memory of mediaserver. dumpsys media.player -m Allocation count 297 Total memory 1483423 size 262144, dup 1, 0x401f4c18, 0x400b6152, 0x401a6568, 0x4061a95c, 0x40146cfa, 0x4019639c, 0x40146ec2, 0x4014a1ec, 0x4014a3ca, 0x00008a98, 0x400b67aa size 178192, dup 1, 0x401f4c18, 0x400b6152, 0x4280adae, 0x427ffcee, 0x4280ae6c, 0x427ec75a, 0x427f7e22, 0x42807648, 0x428082ea, 0x415144f0, 0x4151334a, 0x413381d0, 0x401dcbc, 0x401d438c, 0x4014d996, 0x405c3c46, 0x405c7516, 0x405c6ad4, 0x412c02ca, 0x412c0584, 0x4108c64c, 0x4107d622, 0x4107fbf2, 0x4107c19a, 0x400b2eac, 0x400b2a00 </code> Diff two times of memory dump to check if there is any memory leakage. You can playback one video file between the dump. <code> diff 1.txt 2.txt > diff.txt </code> Get maps file of mediaserver. <code> adb pull proc/<pid of mediaserver>/maps . </code> Use attached script to map back trace to function symbols and file line. <code> ./addr2func.py --root-dir=../../ --maps-file=./maps --product=sabresd_6dq diff.txt </code> Notes: should use eng build for the debug. Another Links : http://freepine.blogspot.kr/2010/02/analyze-memory-leak-of-android-native.html CKG Edit development/android/how_to_debug_memory_leakage_in_media_server_in_android.txt 마지막으로 수정됨: 2020/09/25 10:12저자 127.0.0.1