Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Extracts from "Memory Management for Android Apps"
Search
David Wu
July 06, 2011
Programming
0
140
Extracts from "Memory Management for Android Apps"
Extracts from "Memory Management for Android Apps"
David Wu
July 06, 2011
Tweet
Share
More Decks by David Wu
See All by David Wu
Development with Vert.x: an event-driven application framework for the JVM
wuman
1
250
My Trip to Google I/O 2013
wuman
1
100
A Deep Dive into Open Source Android Development
wuman
18
1.5k
Fancy Rich Text on Android - Using Roguso as an Example
wuman
2
320
Fancy Rich Text Editing on Android - Invited Open Source Software Foundation Talk
wuman
1
720
Improving Android Application Performance (Invited Talk at National Taiwan University)
wuman
5
160
Challenges of Building HTC Sense (O'Reilly Android Open Conference 2011)
wuman
0
140
Extracts from "Android Protips: Advanced Topics for Expert Android App Developers"
wuman
0
300
GTK+ Programming using Vala
wuman
0
280
Other Decks in Programming
See All in Programming
What's new in Spring Modulith?
olivergierke
1
170
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
190
コード生成なしでモック処理を実現!ovechkin-dm/mockioで学ぶメタプログラミング
qualiarts
0
260
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
3
720
Cursorハンズオン実践!
eltociear
2
1.2k
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.2k
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
200
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
8.5k
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
250
Software Architecture
hschwentner
6
2.3k
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
4
14k
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Music & Morning Musume
bryan
46
6.9k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Automating Front-end Workflow
addyosmani
1371
200k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Raft: Consensus for Rubyists
vanstee
140
7.2k
Statistics for Hackers
jakevdp
799
220k
Transcript
Extracts from "Memory Management for Android Apps" Taipei GTUG 20110706
Meetup (http://goo.gl/VdfLK) Original Presenter Patrick Dubroy @dubroy Extract Presenter David Wu @wuman blog.wu-man.com
2 @wuman David Wu
[email protected]
blog.wu-man.com
#tossug, #h4 HTC
3 In 10 Minutes...
4 Purpose Avoid OOM errors
5 Breakdown API Changes Heap size Garbage collection
Bitmap allocations Understanding heap usage Memory leaks Logcat Memory Analyzer (MAT)
6 Heap Size Heap size limits G1: 16MB
Droid: 24MB Nexus One: 32MB Xoom: 48MB ActivityManager.getMemoryClass()
7 Large Heaps <application android:name=”com.example.foobar” andorid:largeHeap=”true” … </application>
8 Garbage Collection
9 Garbage Collection
10 Garbage Collection
11 Garbage Collection
12 Garbage Collection < Gingerbread Stop-the-world Full
heap collection Pause times often > 100ms >= Gingerbread Concurrent (mostly) Partial collections Pause times usually < 5ms
13 Bitmaps (Old)
14 Bitmaps (New)
15 Memory Leaks
16 Logcat
17 Logcat
18 Logcat
19 Logcat
20 Logcat
21 Logcat
22 Heap Dumps Create with DDMS andorid.os.Debug.dumpHprofData()
Conversion hprof-conv orig.hprof converted.hprof Analyze with MAT
23 Shallow and Retained Heap
24 Dominator Tree
25 Demo Debugging a memory leak with MAT
26 Demo
27 References Video of the session http://goo.gl/KRrx7 Original
slides http://goo.gl/0RqIZ Patrick Dubroy's blog http://dubroy.com/blog/