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.
Asked
Active
Viewed 2.3k times
26
Anil Arrabole
- 3,858
- 5
- 32
- 51
-
I would see if logcat gives this information – Owen O'Brien Feb 23 '11 at 19:15
-
I get low memory no more background processes; PROCESS DIED – Anil Arrabole Feb 23 '11 at 20:08
1 Answers
31
Really useful information I got to find the leaks in native code.
- add native=true in ~/.android/ddms.cfg
- replace
/system/lib/libc.sowith/system/lib/libc_debug.so
restart the framework, start DDMS, you'll see a tab native-heap
In native-heap, you can see the allocations by native code.
For more information click here
Marek Sebera
- 38,635
- 35
- 154
- 241
Anil Arrabole
- 3,858
- 5
- 32
- 51
-
6Also see this article for a step-by-step guide on getting the DDMS native heap tracking setup: http://bricolsoftconsulting.com/2012/04/25/how-to-enable-native-heap-tracking-in-ddms/ – Theo May 11 '12 at 04:44
-
6Bricolsoft link changed to http://bricolsoftconsulting.com/how-to-enable-native-heap-tracking-in-ddms/ – Peter Tran Dec 17 '13 at 20:13