640K ought to be enough for anyone
summary
Mobile apps hit out-of-memory even on big-RAM phones because Android imposes a 268 MB per-app heap limit and the system uses zram and an OOM killer that ranks processes, so cold restarts happen. GC work blocks the main thread — one example shows a 102 ms GC pause that drops frames — and using Moshi cuts JSON memory by ~60% reduced pressure in production. Practical fixes include pagination, avoiding largeHeap, reusing allocations, and piping LeakCanary → Crashlytics upload for real-world leak tracing.
AI-written summary · about
chapters (30)
- 0:00Introduction and energy warm-up
- 2:20Speaker introduction and context
- 3:02Bill Gates quote and memory evolution
- 5:08Out of memory issues past and present
- 6:31Monday.com growth and performance struggles
- 8:19User frustration and need for fixes
- 8:42Basics of RAM in Android
- 10:06Process management by Zygote
- 11:07Memory management when RAM is low
- 12:54Out of memory killer and process scores
- 14:00Heap vs stack and garbage collection
- 16:11How garbage collection works
- 19:25Garbage collection stages and pauses
- 21:08Out of memory crashes and heap growth
- 21:52Large heap drawbacks and GC impact
- 22:35Frame rate and user experience
- 24:17Choreographer and frame skipping
- 25:21Memory pitfalls and performance design
- 26:07Allocation pressure and GC frequency
- 27:13Custom view and Compose pitfalls
- 27:55List concatenation and memory waste
- 29:00Library pitfalls with Room and JSON
- 31:08JSON cache memory overhead
- 32:11Profiling shallow vs retain size
- 33:56Shortest path and retain size gotcha
- 34:38Memory leaks and LeakCanary setup
- 36:04Integrating LeakCanary with Crashlytics
- 37:28Common leak gotchas and fixes
- 38:11ViewModel lifecycle owner mistake
- 39:14Conclusion and developer growth
related talks
36mAndroid memory and games
53mMemory on Android, Leaks and OOM
39mUnderstanding Android memory usage
46mDeveloping for Android: the Naughty Bits
49mKeynote: Android Development
41mWays to reduce your app’s memory and storage footprint
38mOptimize your app performance for the next generation of Android
07mAndroid memory tools and best practices
