5

I am trying to find a way to find memory leaks in native code on Android apps. I have found others answers like How to Find memory leaks from native code in android, but these solutions aren't applicable post Android 18 as the DDMS no longer supports the "Native Heap" tab.

So if anyone can suggest a solution, it will be great help!

Community
  • 1
  • 1

2 Answers2

1

https://github.com/android/ndk/issues/431 tracks LSan support for the NDK, which will be the best option when that's done. It's not currently being worked on, but will probably be picked up once TSan is done.

Dan Albert
  • 10,079
  • 2
  • 36
  • 79
  • 1
    ASAN cannot detect memory leak. https://github.com/google/sanitizers/issues/990 – James Feng Jun 25 '21 at 09:18
  • Yes, you're right, thanks. ASan and LSan are commonly deployed together and I was mistaken in thinking that we were doing that for Android. I've updated my answer to point to the LSan tracking bug. – Dan Albert Jul 14 '22 at 22:57
0

https://android-arsenal.com/details/1/1775 here you go. I use this. Installation is already inside the link. Sometimes it is freezing when dumping information but still good I think.

legend12345
  • 162
  • 2
  • 14