As you probably know, starting Android O, you can use debug versions of malloc
in order to inspect memory usage in native codes. We can use these info in order to find memory leaks in native code which is really useful. Tutorials are available here.
I have tried this tutorial both in emulator and a real device and it successfully enables memory tracing. But problem is that application will not load after enabling this feature and logcat
show following error:
E/memtrack: Couldn't load memtrack module
W/android.os.Debug: failed to get memory consumption info: -1
and app will load again when I disable debug version of malloc
, so it is obviously connected to setting this option.
I have searched this error and found few topics like this one, but sadly it could not solve my problem. Has anyone else ever encountered this problem? Any idea how to solve it?