Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Extracts from "Memory Management for Android Apps"
Search
David Wu
July 06, 2011
Programming
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Extracts from "Memory Management for Android Apps"
Extracts from "Memory Management for Android Apps"
David Wu
July 06, 2011
More Decks by David Wu
See All by David Wu
Development with Vert.x: an event-driven application framework for the JVM
wuman
1
280
My Trip to Google I/O 2013
wuman
1
140
A Deep Dive into Open Source Android Development
wuman
18
1.5k
Fancy Rich Text on Android - Using Roguso as an Example
wuman
2
370
Fancy Rich Text Editing on Android - Invited Open Source Software Foundation Talk
wuman
1
760
Improving Android Application Performance (Invited Talk at National Taiwan University)
wuman
5
210
Challenges of Building HTC Sense (O'Reilly Android Open Conference 2011)
wuman
0
190
Extracts from "Android Protips: Advanced Topics for Expert Android App Developers"
wuman
0
330
GTK+ Programming using Vala
wuman
0
330
Other Decks in Programming
See All in Programming
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
270
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
150
Security issues being discussed on Web Platforms
petamoriken
0
940
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.1k
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
1k
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
3
2.3k
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
710
スマート反転とウェブアクセシビリティ
camiha
0
210
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
120
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
110
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
Practical Orchestrator
shlominoach
192
12k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
330
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
720
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Paper Plane
katiecoart
PRO
4
53k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.8k
Fireside Chat
paigeccino
43
4k
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/