Android memory tools and best practices
summary
Android memory management details, concrete tools and actionable steps: use Native Memory Profiler (stack traces of malloc/free) to find native leaks and missing deallocations and run malloc/free instead of custom mmap pools; use heapprofd to compare 32‑bit vs 64‑bit sizes (Tencent finds structure growth of ~10 MB after pointer doubling); detect pointer bugs with Hardware ASan (Android 10+, Pixel flash an AOSP ASan image, disable Play Services, build 64‑bit with modified build.gradle/CMakeLists), and watch OnTrimMemory/adb bugreport for lowmemorykiller kills.
AI-written summary · about
chapters (6)
- 0:00Android memory management
- 0:48Low memory handling tips
- 1:46Native memory profiling
- 3:25Case study: PUBG Mobile
- 4:20Hardware address sanitizer
- 5:44Implementing hardware ASan
related talks
36mAndroid memory and games
53mMemory on Android, Leaks and OOM
38mOptimize your app performance for the next generation of Android
43mMemory Dumps: Going beyond the memory leak
39mUnderstanding Android memory usage
50mAdvanced Development and Debugging for Android/iOS
38mOptimize your app performance for the next generation of Android
24mUnveiling the Unseen Threat: Demystifying Memory Leaks in Android
