Hi guys,

I've tried to get to know about how to detect memory leaks for Android
native code these days, but it's failed again and again. I've followed
steps on http://elinux.org/Android_Memory_Usage, and my steps were
listed below:
     1. adb shell setprop libc.debug.malloc 1
     2. adb shell stop
     3. adb shell start

At first, I tried it on Emulator, whose build version is Android 2.3.
There are following three .so files related with libc in the /system/
lib directory of Emulator.
     libc.so
     libc_malloc_debug_leak.so
     libc_malloc_debug_qemu.so

Step(1) was succeeded, and I can get "[libc.debug.malloc]: [1]"
through command "adb shell getprop".
After step (2), all buttons on the Emulator were unclickable.
And then, step(3) was executed. After that, it seems that Emulator was
restarted, but it stayed at the page with big "Android" and the
Android UI was never shown up.

Ast last, I rooted my Nexus One with Android 2.3.6, and repeated those
three steps. But I got the following problems.
    1. No "libc.debug.malloc" item after step(1) when I checked it
through "adb shell getprop".
    2. No any response after step (2) & (3).

Btw, there were no files "libc_malloc_debug_leak.so" and
"libc_malloc_debug_leak.so" in the /system/lib directory.

Is there anyone got to know the reason about my problem? Meanwhile, if
I want to detect memory leaks on my Nexus One, what should I do? If
the native code is C++ instead of C, is there any difference for the
steps?

Can you guys share your any experience about memory leaks on Native
code with me? Since I didn't get more useful resources from Google.

Thanks,
Joe


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to