Howto find native code memory leak in Android
If you have the right kind of build on the ph
one, you can replace /
system/lib/libc.so with /system/lib/libc_debug.so and restart the
framework. Add "native=true" to your ~/.android/ddms.cfg, and start
the stand-alone version of DDMS. You should now have a "Native Heap"
tab that you can use to examine native allocations.
system/lib/libc.so with /system/lib/libc_debug.so and restart the
framework. Add "native=true" to your ~/.android/ddms.cfg, and start
the stand-alone version of DDMS. You should now have a "Native Heap"
tab that you can use to examine native allocations.
本文提供了一种方法,在手机上通过替换system/lib/libc.so为system/lib/libc_debug.so并重启框架,然后在~/.android/ddms.cfg中添加native=true,启动独立版DDMS,从而在NativeHeap标签下查看原生内存分配,诊断内存泄漏。
270

被折叠的 条评论
为什么被折叠?



