SlideShare a Scribd company logo
Memory ManagementMemory Management
in Androidin Android
ESTF 2015, Bengaluru
CC-BY-SA 3.0 - Attribution requirements and misc., PLEASE READ:
This slide must remain as-is in this specific location (slide #1), everything else you are free to
change; including the logo :-)
Use of figures in other documents must feature the below "Originals at" URL immediately
under that figure and the below copyright notice where appropriate.
You are FORBIDDEN from using the default "About" slide as-is or any of its contents.
Copyright (C) 2014-2015, Opersys inc.
These slides created by: Karim Yaghmour
Originals at: http://www.opersys.com/training/
AboutAbout
Introduced Linux Trace Toolkit in 1999
Originated Adeos and relayfs (kernel/relay.c)
Ara Android Arch Oversight
Training, Custom Dev, Consulting, ...
"Note that memory usage on modern operating systems like Linux is an extremely
complicated and difficult to understand area. In fact the chances of you actually
correctly interpreting whatever numbers you get is extremely low. (Pretty much
every time I look at memory usage numbers with other engineers, there is always
a long discussion about what they actually mean that only results in a vague
conclusion.)"
-- Dianne Hackborn, Feb 19, 2010, Stackoverflow
AgendaAgenda
Architecture Recap1.
Kernel's overall role2.
Kernel driver interfaces3.
Kernel user-space interfaces4.
Low-memory conditions5.
Bionic6.
App Dev Considerations7.
Tools8.
Misc.9.
References10.
Demo HardwareDemo Hardware
Nexus 7 2013 ("flo")
Qualcomm Snapdragon S4 Pro – APQ8064
Krait CPU, 4-core, 1.51 GHz, 2MB L2 cache
2 GB on-board DDR3 (PCDDR 533MHz)
16 GB eMMC
Combined power/usb
Architecture RecapArchitecture Recap
AOSP
System startup
Memory layout
1. AOSP1. AOSP
Memory Management in Android
2. System startup2. System startup
Memory Management in Android
3. Memory layout3. Memory layout
Memory Management in Android
Kernel's overall roleKernel's overall role
Manage physical memory
Manage virtual-to-physical mappings
Process isolation:
Protect the hardware from user-space
Protect processes from each other
Driver capabilities:
Memory-mapped registers
DMA
MTD maps
Filesystem cache
File mapping
Swapping
InternalsInternals
Architecture-independent:
Architecture-specific:
Per-task struct (include/linux/sched.h):
The memory structures (include/linux/mm_types.h):
mm/
arch/arm/mm/
struct task_struct {
...
struct mm_struct *mm, *active_mm;
...
struct mm_struct {
struct vm_area_struct * mmap; /* list of VMAs */
struct rb_root mm_rb;
struct vm_area_struct * mmap_cache; /* last find_vma result */
Kernel driver interfacesKernel driver interfaces
Memory-mapped registers
DMA
MTD maps
ION
Kernel user-space interfacesKernel user-space interfaces
brk
mmap/munmap
Low-memory conditionsLow-memory conditions
OOM killer
oom_adj
Android low-mem driver
oom_adj set during init
Modifications to oom_adj at runtime by framework
BionicBionic
malloc()/free()
Comes from Doug Lea's dlmalloc
Public Domain
See bionic/libc/upstream-dlmalloc/
Tutorial/doc:
Dates back to 1987
Uses CALL_MORECORE() macro do allocations
Based on sbrk()
dlopen()/dlsym()
http://g.oswego.edu/dl/html/malloc.html
https://en.wikipedia.org/wiki/C_dynamic_memory_allocation
Flags to debug/observe malloc/free Linux
Enable native monitoring by DDMS:
Open ~/.android/ddms.cfg
Add line stating: "native=true"
$ adb shell setprop libc.debug.malloc 1
$ adb shell stop
$ adb shell start
App Dev ConsiderationsApp Dev Considerations
Recommendations given by Google
Measuring app mem usage
Getting system mem usage
android.os.Debug
android:largeHeap="true"
https://developer.android.com/training/articles
/memory.html
https://developer.android.com/reference/android
/app/ActivityManager.html#getProcessMemoryInfo%28int[]%29
public MemoryInfo[] getProcessMemoryInfo (int[] pids)
https://developer.android.com/reference/android
/app/ActivityManager.html#getMemoryInfo%28android.app.ActivityManager.MemoryInfo%29
public void getMemoryInfo (ActivityManager.MemoryInfo outInfo)
ToolsTools
Kernel
Native
Dalvik/ART
Framework
8.1 Kernel8.1 Kernel
Overall memory use
Physical-mapped reg address ranges
FS cache
"fragmentation"
/proc interface
RSS, VSS, USS, PSS, etc.
/proc/[pid]/maps, semantics of
8.2 Native8.2 Native
dumpstate
librank
procrank
procmem
showmap
tombstones
debuggerd
core files
8.3 Dalvik/ART8.3 Dalvik/ART
Heap size measurement
API in apps to get access to heap size from Runtime
MAT/Eclipse
dalvik.vm.heapsize
https://developer.android.com
/reference/java/lang/Runtime.html#maxMemory%28%29
public long maxMemory ()
8.4. Framework8.4. Framework
dumpsys meminfo
dumpsys procinfo
Misc.Misc.
DDOS on memory
KitKat efforts for low-mem
Security aspects
HAL use of mmap
Swap space?
zMAP
ION
CMA
ReferencesReferences
developer.android.com
source.android.com
strong/weak/soft/phantom references wrt Java GC: -
-
-->
http://source.android.com/devices/native-memory.html
http://source.android.com/devices/low-ram.html
https://developer.android.com/tools/debugging/debugging-memory.html
https://developer.android.com/training/articles/memory.html
http://android-developers.blogspot.com/2011/03/memory-analysis-
for-android.html
http://android-developers.blogspot.com/2009/02/track-memory-
allocations.html
https://stackoverflow.com/questions/2298208/how-to-discover-memory-
usage-of-my-application-in-android
http://elinux.org/Android_Memory_Usage
https://www.youtube.com/watch?v=_CruQY55HOk
http://blog.yojimbocorp.com/2012/10/03/view-android-application-memory-
usage-with-eclipse-ddms-plugin/
https://lwn.net/Articles/480055/
https://lwn.net/Articles/565469/
https://weblogs.java.net/blog/2006
/05/04/understanding-weak-references http://docs.oracle.com/javase/7/docs
/api/java/lang/ref/package-summary.html
Thank You!Thank You!
karim.yaghmour@opersys.com

More Related Content

What's hot (20)

PDF
Android 10 Internals Update
Opersys inc.
 
PDF
Android Security Internals
Opersys inc.
 
PDF
Android Platform Debugging and Development
Karim Yaghmour
 
PDF
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
ODP
Enhancing and modifying_the_core_android_os
Arnav Gupta
 
PDF
Is Android the New Embedded Linux? at AnDevCon VI
Opersys inc.
 
PDF
Android on Intel Architecture: ROM Cooking Tutorial
Ron Munitz
 
PDF
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.
 
PDF
Android Internals
Opersys inc.
 
ODP
Android crash debugging
Ashish Agrawal
 
PPT
Learning AOSP - Android Booting Process
Nanik Tolaram
 
PDF
Android Things Internals
Opersys inc.
 
PDF
Android Jumpstart ESC SV 2012 Part I
Opersys inc.
 
PDF
Embedded Android Workshop
Opersys inc.
 
PDF
Embedded Android Workshop with Marshmallow
Opersys inc.
 
PDF
Android On Development Boards at AnDevCon3
Opersys inc.
 
PDF
Scheduling in Android
Opersys inc.
 
PDF
Workshop su Android Kernel Hacking
Develer S.r.l.
 
PDF
Embedded Android Workshop part I ESC SV 2012
Opersys inc.
 
Android 10 Internals Update
Opersys inc.
 
Android Security Internals
Opersys inc.
 
Android Platform Debugging and Development
Karim Yaghmour
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
Android Platform Debugging and Development
Opersys inc.
 
Enhancing and modifying_the_core_android_os
Arnav Gupta
 
Is Android the New Embedded Linux? at AnDevCon VI
Opersys inc.
 
Android on Intel Architecture: ROM Cooking Tutorial
Ron Munitz
 
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.
 
Android Internals
Opersys inc.
 
Android crash debugging
Ashish Agrawal
 
Learning AOSP - Android Booting Process
Nanik Tolaram
 
Android Things Internals
Opersys inc.
 
Android Jumpstart ESC SV 2012 Part I
Opersys inc.
 
Embedded Android Workshop
Opersys inc.
 
Embedded Android Workshop with Marshmallow
Opersys inc.
 
Android On Development Boards at AnDevCon3
Opersys inc.
 
Scheduling in Android
Opersys inc.
 
Workshop su Android Kernel Hacking
Develer S.r.l.
 
Embedded Android Workshop part I ESC SV 2012
Opersys inc.
 

Similar to Memory Management in Android (20)

PDF
Memory Management in Android
Opersys inc.
 
PDF
Memory Management in Android
Opersys inc.
 
PDF
Android memory analysis Debug slides.pdf
VishalKumarJha10
 
PDF
KeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be Dangerous
Priyanka Aash
 
PDF
Us 18-chen-keen lab-ios-jailbreak-internals
Liang Chen
 
PDF
Reliability, Availability and Serviceability on Linux
Samsung Open Source Group
 
PDF
Linux Memory Management
Anil Kumar Pugalia
 
DOCX
Chromium os architecture report
Amr Abd El Latief
 
PDF
淺談探索 Linux 系統設計之道
National Cheng Kung University
 
PPT
Memory management in linux
Dr. C.V. Suresh Babu
 
PDF
Memory Management in Android
Opersys inc.
 
PDF
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
RootedCON
 
PDF
Faults inside System Software
National Cheng Kung University
 
PPTX
Lecture02_LinuxBasedEmbeddedSystemComponentStack.pptx
ChetanNaikJECE
 
PPTX
Lecture02_LinuxBasedEmbeddedSystemComponentStack.pptx
ChetanNaikJECE
 
PPTX
Lecture02_LinuxBasedEmbeddedSystemComponentStack.pptx
ChetanNaikJECE
 
ODP
Debugging Native heap OOM - JavaOne 2013
MattKilner
 
PDF
Ov psim demo_slides_power_pc
simon56
 
PPTX
Operating system
Ariful Islam
 
PDF
Walking around linux kernel
Dharshana Kasun Warusavitharana
 
Memory Management in Android
Opersys inc.
 
Memory Management in Android
Opersys inc.
 
Android memory analysis Debug slides.pdf
VishalKumarJha10
 
KeenLab iOS Jailbreak Internals: Userland Read-Only Memory can be Dangerous
Priyanka Aash
 
Us 18-chen-keen lab-ios-jailbreak-internals
Liang Chen
 
Reliability, Availability and Serviceability on Linux
Samsung Open Source Group
 
Linux Memory Management
Anil Kumar Pugalia
 
Chromium os architecture report
Amr Abd El Latief
 
淺談探索 Linux 系統設計之道
National Cheng Kung University
 
Memory management in linux
Dr. C.V. Suresh Babu
 
Memory Management in Android
Opersys inc.
 
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
RootedCON
 
Faults inside System Software
National Cheng Kung University
 
Lecture02_LinuxBasedEmbeddedSystemComponentStack.pptx
ChetanNaikJECE
 
Lecture02_LinuxBasedEmbeddedSystemComponentStack.pptx
ChetanNaikJECE
 
Lecture02_LinuxBasedEmbeddedSystemComponentStack.pptx
ChetanNaikJECE
 
Debugging Native heap OOM - JavaOne 2013
MattKilner
 
Ov psim demo_slides_power_pc
simon56
 
Operating system
Ariful Islam
 
Walking around linux kernel
Dharshana Kasun Warusavitharana
 
Ad

More from Opersys inc. (20)

PDF
Android Automotive
Opersys inc.
 
PDF
Embedded Android Workshop with Pie
Opersys inc.
 
PDF
Android's HIDL: Treble in the HAL
Opersys inc.
 
PDF
Android Treble: Blessing or Trouble?
Opersys inc.
 
PDF
Embedded Android Workshop with Oreo
Opersys inc.
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PDF
Embedded Android Workshop with Nougat
Opersys inc.
 
PDF
Embedded Android Workshop with Nougat
Opersys inc.
 
PDF
Android Things: Android for IoT
Opersys inc.
 
PDF
Android Things Internals
Opersys inc.
 
PDF
Brillo / Weave Internals
Opersys inc.
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PDF
Embedded Android Workshop with Nougat
Opersys inc.
 
PDF
Brillo / Weave Internals
Opersys inc.
 
PDF
Project Ara
Opersys inc.
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PDF
Brillo/Weave Internals
Opersys inc.
 
PDF
Android Platform Debugging and Development
Opersys inc.
 
PDF
Embedded Android Workshop with Marshmallow
Opersys inc.
 
PDF
Project Ara
Opersys inc.
 
Android Automotive
Opersys inc.
 
Embedded Android Workshop with Pie
Opersys inc.
 
Android's HIDL: Treble in the HAL
Opersys inc.
 
Android Treble: Blessing or Trouble?
Opersys inc.
 
Embedded Android Workshop with Oreo
Opersys inc.
 
Android Platform Debugging and Development
Opersys inc.
 
Embedded Android Workshop with Nougat
Opersys inc.
 
Embedded Android Workshop with Nougat
Opersys inc.
 
Android Things: Android for IoT
Opersys inc.
 
Android Things Internals
Opersys inc.
 
Brillo / Weave Internals
Opersys inc.
 
Android Platform Debugging and Development
Opersys inc.
 
Embedded Android Workshop with Nougat
Opersys inc.
 
Brillo / Weave Internals
Opersys inc.
 
Project Ara
Opersys inc.
 
Android Platform Debugging and Development
Opersys inc.
 
Brillo/Weave Internals
Opersys inc.
 
Android Platform Debugging and Development
Opersys inc.
 
Embedded Android Workshop with Marshmallow
Opersys inc.
 
Project Ara
Opersys inc.
 
Ad

Recently uploaded (20)

PPTX
ManageIQ - Sprint 265 Review - Slide Deck
ManageIQ
 
PPTX
Quality on Autopilot: Scaling Testing in Uyuni
Oscar Barrios Torrero
 
PPTX
WYSIWYG Web Builder Crack 2025 – Free Download Full Version with License Key
HyperPc soft
 
PPTX
For my supp to finally picking supp that work
necas19388
 
PDF
Transparency into Your Software’s True Reach
team-WIBU
 
PPTX
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
PDF
65811_Introducing the Fusion AI Agent Studio (1).pdf
g6129590
 
PPTX
ERP - FICO Presentation BY BSL BOKARO STEEL LIMITED.pptx
ravisranjan
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PDF
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PDF
Continouous failure - Why do we make our lives hard?
Papp Krisztián
 
PDF
Dealing with JSON in the relational world
Andres Almiray
 
PDF
>Nitro Pro Crack 14.36.1.0 + Keygen Free Download [Latest]
utfefguu
 
PPTX
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
PPTX
ManageIQ - Sprint 264 Review - Slide Deck
ManageIQ
 
PDF
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
 
PPTX
computer forensics encase emager app exp6 1.pptx
ssuser343e92
 
PDF
>Wondershare Filmora Crack Free Download 2025
utfefguu
 
PDF
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
 
ManageIQ - Sprint 265 Review - Slide Deck
ManageIQ
 
Quality on Autopilot: Scaling Testing in Uyuni
Oscar Barrios Torrero
 
WYSIWYG Web Builder Crack 2025 – Free Download Full Version with License Key
HyperPc soft
 
For my supp to finally picking supp that work
necas19388
 
Transparency into Your Software’s True Reach
team-WIBU
 
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
65811_Introducing the Fusion AI Agent Studio (1).pdf
g6129590
 
ERP - FICO Presentation BY BSL BOKARO STEEL LIMITED.pptx
ravisranjan
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
Continouous failure - Why do we make our lives hard?
Papp Krisztián
 
Dealing with JSON in the relational world
Andres Almiray
 
>Nitro Pro Crack 14.36.1.0 + Keygen Free Download [Latest]
utfefguu
 
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
ManageIQ - Sprint 264 Review - Slide Deck
ManageIQ
 
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
 
computer forensics encase emager app exp6 1.pptx
ssuser343e92
 
>Wondershare Filmora Crack Free Download 2025
utfefguu
 
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
 

Memory Management in Android

  • 1. Memory ManagementMemory Management in Androidin Android ESTF 2015, Bengaluru
  • 2. CC-BY-SA 3.0 - Attribution requirements and misc., PLEASE READ: This slide must remain as-is in this specific location (slide #1), everything else you are free to change; including the logo :-) Use of figures in other documents must feature the below "Originals at" URL immediately under that figure and the below copyright notice where appropriate. You are FORBIDDEN from using the default "About" slide as-is or any of its contents. Copyright (C) 2014-2015, Opersys inc. These slides created by: Karim Yaghmour Originals at: http://www.opersys.com/training/
  • 4. Introduced Linux Trace Toolkit in 1999 Originated Adeos and relayfs (kernel/relay.c) Ara Android Arch Oversight Training, Custom Dev, Consulting, ...
  • 5. "Note that memory usage on modern operating systems like Linux is an extremely complicated and difficult to understand area. In fact the chances of you actually correctly interpreting whatever numbers you get is extremely low. (Pretty much every time I look at memory usage numbers with other engineers, there is always a long discussion about what they actually mean that only results in a vague conclusion.)" -- Dianne Hackborn, Feb 19, 2010, Stackoverflow
  • 6. AgendaAgenda Architecture Recap1. Kernel's overall role2. Kernel driver interfaces3. Kernel user-space interfaces4. Low-memory conditions5. Bionic6. App Dev Considerations7. Tools8. Misc.9. References10.
  • 7. Demo HardwareDemo Hardware Nexus 7 2013 ("flo") Qualcomm Snapdragon S4 Pro – APQ8064 Krait CPU, 4-core, 1.51 GHz, 2MB L2 cache 2 GB on-board DDR3 (PCDDR 533MHz) 16 GB eMMC Combined power/usb
  • 11. 2. System startup2. System startup
  • 13. 3. Memory layout3. Memory layout
  • 15. Kernel's overall roleKernel's overall role Manage physical memory Manage virtual-to-physical mappings Process isolation: Protect the hardware from user-space Protect processes from each other Driver capabilities: Memory-mapped registers DMA MTD maps Filesystem cache File mapping Swapping
  • 16. InternalsInternals Architecture-independent: Architecture-specific: Per-task struct (include/linux/sched.h): The memory structures (include/linux/mm_types.h): mm/ arch/arm/mm/ struct task_struct { ... struct mm_struct *mm, *active_mm; ... struct mm_struct { struct vm_area_struct * mmap; /* list of VMAs */ struct rb_root mm_rb; struct vm_area_struct * mmap_cache; /* last find_vma result */
  • 17. Kernel driver interfacesKernel driver interfaces Memory-mapped registers DMA MTD maps ION
  • 18. Kernel user-space interfacesKernel user-space interfaces brk mmap/munmap
  • 19. Low-memory conditionsLow-memory conditions OOM killer oom_adj Android low-mem driver oom_adj set during init Modifications to oom_adj at runtime by framework
  • 20. BionicBionic malloc()/free() Comes from Doug Lea's dlmalloc Public Domain See bionic/libc/upstream-dlmalloc/ Tutorial/doc: Dates back to 1987 Uses CALL_MORECORE() macro do allocations Based on sbrk() dlopen()/dlsym() http://g.oswego.edu/dl/html/malloc.html https://en.wikipedia.org/wiki/C_dynamic_memory_allocation
  • 21. Flags to debug/observe malloc/free Linux Enable native monitoring by DDMS: Open ~/.android/ddms.cfg Add line stating: "native=true" $ adb shell setprop libc.debug.malloc 1 $ adb shell stop $ adb shell start
  • 22. App Dev ConsiderationsApp Dev Considerations Recommendations given by Google Measuring app mem usage Getting system mem usage android.os.Debug android:largeHeap="true" https://developer.android.com/training/articles /memory.html https://developer.android.com/reference/android /app/ActivityManager.html#getProcessMemoryInfo%28int[]%29 public MemoryInfo[] getProcessMemoryInfo (int[] pids) https://developer.android.com/reference/android /app/ActivityManager.html#getMemoryInfo%28android.app.ActivityManager.MemoryInfo%29 public void getMemoryInfo (ActivityManager.MemoryInfo outInfo)
  • 24. 8.1 Kernel8.1 Kernel Overall memory use Physical-mapped reg address ranges FS cache "fragmentation" /proc interface RSS, VSS, USS, PSS, etc. /proc/[pid]/maps, semantics of
  • 26. 8.3 Dalvik/ART8.3 Dalvik/ART Heap size measurement API in apps to get access to heap size from Runtime MAT/Eclipse dalvik.vm.heapsize https://developer.android.com /reference/java/lang/Runtime.html#maxMemory%28%29 public long maxMemory ()
  • 27. 8.4. Framework8.4. Framework dumpsys meminfo dumpsys procinfo
  • 28. Misc.Misc. DDOS on memory KitKat efforts for low-mem Security aspects HAL use of mmap Swap space? zMAP ION CMA
  • 29. ReferencesReferences developer.android.com source.android.com strong/weak/soft/phantom references wrt Java GC: - - --> http://source.android.com/devices/native-memory.html http://source.android.com/devices/low-ram.html https://developer.android.com/tools/debugging/debugging-memory.html https://developer.android.com/training/articles/memory.html http://android-developers.blogspot.com/2011/03/memory-analysis- for-android.html http://android-developers.blogspot.com/2009/02/track-memory- allocations.html https://stackoverflow.com/questions/2298208/how-to-discover-memory- usage-of-my-application-in-android http://elinux.org/Android_Memory_Usage https://www.youtube.com/watch?v=_CruQY55HOk http://blog.yojimbocorp.com/2012/10/03/view-android-application-memory- usage-with-eclipse-ddms-plugin/ https://lwn.net/Articles/480055/ https://lwn.net/Articles/565469/ https://weblogs.java.net/blog/2006 /05/04/understanding-weak-references http://docs.oracle.com/javase/7/docs /api/java/lang/ref/package-summary.html