说明:
开机的时候dumpsys meminfo | grep media.codec的时候内存增长到51M,正常时8M,需要分析内存为啥增长。
方法:
加pid打印只是分析出car和system_server进程,最终确认car进程时1M,system_server进程时50M,需要继续看,加堆栈打印,发现是EvsCamera进程导致内存增大。
zhoujinyan@rev250:~/codes/ZR8666/frameworks$ git diff .
diff --git a/frameworks/av/media/libstagefright/Android.bp b/frameworks/av/media/libstagefright/Android.bp
index 1d31ea7..9c9c6ca 100644
--- a/frameworks/av/media/libstagefright/Android.bp
+++ b/frameworks/av/media/libstagefright/Android.bp
@@ -182,6 +182,7 @@ cc_library_shared {
"android.hardware.media.omx@1.0",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.mapper@2.0",
+ "libutilscallstack",
],
static_libs: [
diff --git a/frameworks/av/media/libstagefright/MediaCodec.cpp b/frameworks/av/media/libstagefright/Media
|