You have Android version >= 2.2.
- > adb shell ls /system/lib/libc_malloc_debug_leak.so
- > adb shell setprop libc.debug.malloc 1
- > adb shell stop
- > adb shell start
- > adb logcat -b main -v threadtime (you see this line in the printed log: 03-29 03:10:52.942 4200 4200 I libc : /system/bin/logcat using MALLOC_DEBUG = 1 (leak checker))
- > adb shell setprop libc.debug.malloc 5
# For filling allocated /freed memory with patterns defined by CHK_SENTINEL_VALUE, and CHK_FILL_FREE macros.
- > adb shell setprop libc.debug.malloc 10
# For adding pre-, and post- allocation stubs in order to detect buffer overruns.




