本文介绍了如何查找本机code在Android的内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只是想知道,如果有人知道如何找出从Android原生code内存泄漏。谷歌搜索提供了很多解决方案,但他们都不是完整的。请让我知道,如果有人知道如何做到这一点。
Just wondering if someone knows how to find out memory leaks in native code from android. Google search gives lot of solution, but none of them is full. Please let me know if anybody knows how to do this.
推荐答案
真正有用的信息。
- 添加本地=真正的在〜/ .android / ddms.cfg
- 替换
/system/lib/libc.so
与/system/lib/libc_debug.so
重新启动框架,启动DDMS,你会看到一个标签机堆
- add native=true in ~/.android/ddms.cfg
- replace
/system/lib/libc.so
with/system/lib/libc_debug.so
restart the framework, start DDMS, you'll see a tab native-heap
在本机堆,可以看到分配母语code。
In native-heap, you can see the allocations by native code.
有关详细信息,<一个href="http://groups.google.com/group/android-porting/browse_thread/thread/9c84baa10cebbb68/f6d1e40cac02ffd3?pli=1">click这里
这篇关于如何查找本机code在Android的内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!