~/talk

Surviving the Low Memory Killer with Local AI Runtimes

Talkat DroidKaigi 2026 · 2026-09-01..09-03· [android, large-language-models]
name:SoumiS
links:none on file
slides:none on file

Production architecture for surviving LMKD that intercepts ComponentCallbacks2 signals to halt allocations, offloads tensors out of the Java heap into shared memory (demo moves 48 MB from heap to a shared tensor), and memory maps large weights with mmap so demand paging lets a 12‑engine pool run where it otherwise fails. Uses direct/native buffers and ByteBuffer.allocateDirect, routes compute to NNAPI / Light RT NPUs, queries getThermalHeadroom, and adds WAL checkpoints for transactional resume.

AI-written summary · about

  1. 0:00Introduction
  2. 0:57Local AI runtimes necessity
  3. 2:01Auto-regressive generation & KV cache
  4. 3:46Android memory & LMKD
  5. 5:55LMKD app termination
  6. 7:23ComponentCallbacks2 for memory
  7. 10:38Java heap & garbage collection
  8. 12:01Shared memory offloading
  9. 14:07mmap virtual memory
  10. 17:19Hardware for AI models
  11. 19:47Thermal throttling & APIs
  12. 20:49WAL logging resiliency
  13. 21:52Memory optimization recap
  14. 23:17Q&A
~/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.