[Vietnam Mobile Day 2013] - Memory management for android applications

892 views

Published on

Diễn giả: Bùi Quốc Việt
Đơn vị: AiTi Eduacation

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
892
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

[Vietnam Mobile Day 2013] - Memory management for android applications

  1. 1. Memory ManagementFor Android Apps
  2. 2. Who am I ?Faculty at Aiti-AptechAndroid leader at Zoo Studio
  3. 3. What will I share today ? Heap size Garbage Collection Bitmap management
  4. 4. 290 MB2GB
  5. 5. Heap size Heap size Limits.G1 : 16MBNexus One : 32MBGalaxy S3 : 64MB
  6. 6. Heap size Honeycomb (3.0) support option : “largetHeap” ActivityManager.getLargeMemoryClass()
  7. 7. Garbage Collection
  8. 8. Garbage Collection Bigger heaps = longer pauses Pre- Gingerbread Stop all application Pause time > 100ms Gingerbread and beyond Concurrent Pause times < 5ms
  9. 9. Bitmap Pre Android 2.3 Freed via recycle() Full, Stop the world GCs
  10. 10. Bitmap > Android 2.3 Freed synchronously by GC Concurrent & partial GCs
  11. 11. GC_FOR_ALLOC freed <1K, 5% free 4961K/5176K,paused 13ms, total 13msGC_CONCURRENT freed 0K, 5% free 4961K/5176K,paused 8ms+0ms, total 10msGC_FOR_ALLOC freed 2418K, 45% free3192K/5788K, paused 1ms, total 1ms
  12. 12. References http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html. http://kohlerm.blogspot.com/2009/02/memory-leaks-are-easy-to-find.html http://developer.android.com/training/displaying-bitmaps/manage-memory.html
  13. 13. Thank you !!! Email : vietbq@moneylover.me

×