native heap memory leak

Native Heap:

To get Native Heap status on DDMS:

On Linux build env, edit ~\.android\ddms.cfg and add "native=true"

 

Setup this Linux env variable:

# export ANDROID_ADDR2LINE=addr2line

 

Then launch ddms from Linux build env (this will permit to inherit symbol path)

# ddms

 

On DDMS UI, select the "Native Heap" tab.

In //, on Android board, select the leak malloc debug library and restart the UI:

# setprop libc.debug.malloc 1
# stop
# start

 

On DDMS, select a Process and click on "Snapshot Current Native Heap Usage".

You can compare 2 snapshots using the "+-" button.

Note:

Without DDMS, use AM:

# am dumpheap -n <PID> /data/dump.txt

posted on 2014-12-13 10:08  阿加  阅读(1225)  评论(0)    收藏  举报

导航