~/talk

Understanding Android memory usage

Talkat Google I/O 2018 · 2018-05-08..05-10· [android]
links:none on file
slides:none on file

Android memory pressure triggers kswapd to reclaim cached pages and then the low memory killer to terminate processes in priority order (native, system_server, persistent, foreground, perceptible, services, home, previous, cached), so app behavior on a 2GB versus 512MB device (and Chrome’s PSS falling as pressure rises) matters. Measure impact with PSS via adb shell dumpsys meminfo -s (or -a, showmap, debug malloc when needed), profile the Java heap with Android Studio Memory Profiler, and shrink APKs; test consistent use cases on devices with ample free RAM.

AI-written summary · about

  1. 0:00Intro
  2. 0:38Memory and the Android ecosystem
  3. 2:40Physical memory on device
  4. 3:162 GB device under memory pressure
  5. 5:43Android process list and the low memory killer
  6. 11:33512 MB device under memory pressure
  7. 12:59Application memory impact with shared pages
  8. 16:45User value / memory impact tradeoff
  9. 20:13Memory impact depends on a bunch of things
  10. 21:49Gmail memory for various platform configs
  11. 23:39Chrome PSS under increasing memory pressure
  12. 26:29Android Studio's memory profiler
  13. 27:41But what about the rest of the memory?
  14. 33:35Non-Java allocations are often tied to Java allocations
  15. 35:09Things that take space in your APK tend to take memory at runtime too
  16. 36:591. How memory use impacts a device
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.