SlideShare a Scribd company logo
Memory Related issues, why?
Memory Related issues, why? 
● Each application runs in a linux process, having 
a Virtual machine (Dalvik VM) running inside it. 
● Hard Limit of memeory is present based on 
device heap size which can be 16MB, 32MB, 
64MB. 
● If application demand more memory then limit, 
it gives OutOfMemory error.
Memory Related issues, why? 
● Some operation which demands a lot of 
memory even when we don't have. 
● Leaking memory i.e. some object which is not 
under use but still not available for GC. 
● Dealing with large bitmaps and loading them 
together.
Heap Sizes on different devices 
● Heap Size Limit 
– G1 – 16MB 
– Droid - 24MB 
– Nexus One – 32MB 
– Galaxy S3 – 64MB
Memory Related issues: How to 
find?
How to find memory Leak 
● Can be done using logcat logs: 
– [Reason] [Amount Freed], [Heap Statistics], 
[External Memory Statistics], [Pause Time] 
– GC_EXPLICIT freed 4178K, 18% free 
26631K/32304K, paused 3ms+9ms, total 
166ms 
● The GC_EXPLICIT happens when we call the 
System.gc()
Reasons of memory leak 
GC_FOR_MALLOC/GC_FOR_ALLOC(new name) means that the GC was triggered because there 
wasn't enough memory left on the heap to perform an allocation. Might be triggered when new 
objects are being created. 
GC_EXPLICIT means that the garbage collector has been explicitly asked to collect, instead of 
being triggered by high water marks in the heap. Happens all over the place, but most likely when a 
thread is being killed or when a binder communication is taken down. 
GC_CONCURRENT Triggered when the heap has reached a certain amount of objects to collect. 
GC_EXTERNAL_ALLOC means that the the VM is trying to reduce the amount of memory used for 
collectable objects, to make room for more non-collectable. 
GC_BEFORE_OOM means that the system is running really low on memory, and that there is a 
final GC performed, in order to avoid calling the low memory killer.
Memory Related issues, How to 
Debug?
Debugging 
● Check Heap size 
● Dump Heap at different points and find items 
taking lot of heap – using MAT 
● Use Allocation Tracker to check what all 
objects are allocated in a time period : try to 
analyze
Debug using MAT 
● Install eclipse plugging : Memory Analyzer 
● Dump Heap using DDMS and open it in MAT. 
● Check memory usage and places where it is 
being used. 
● Check Histogram : List of number of instances 
per class 
● Dominator tree: Gives domanint node for each 
memory allocation. 
● Gives other useful data for memory analysis.
MAT terminology 
● Shallow Heap 
● Retained Heap 
● Dominator tree 
●
Debug using MAT 
● Compare two heap dumps using MAT to 
identify difference at two instance. 
– Open the first HPROF file (using File > Open Heap Dump). 
– Open the Histogram view. 
– In the Navigation History view, right click on histogram and select 
Add to Compare Basket. 
– Check the difference in memory allocation at two instances
Useful Adb Commands
Adb commands 
● Adb shell ps → gives processes running 
● adb shell dumpsys meminfo PID-> gives 
memory info of process 
● adb shell cat /proc/meminfo-> gives a 
summary of the overall memory usage of the 
system.

More Related Content

What's hot

Java gc and JVM optimization
Java gc  and JVM optimizationJava gc  and JVM optimization
Java gc and JVM optimizationRajan Jethva
 
bup backup system (2011-04)
bup backup system (2011-04)bup backup system (2011-04)
bup backup system (2011-04)apenwarr
 
"Работа с утечками в V8", Роман Кривцов, MoscowJS 19
"Работа с утечками в V8", Роман Кривцов, MoscowJS 19"Работа с утечками в V8", Роман Кривцов, MoscowJS 19
"Работа с утечками в V8", Роман Кривцов, MoscowJS 19MoscowJS
 
Building a developer community with containers
Building a developer community with containersBuilding a developer community with containers
Building a developer community with containersRex Tsai
 
Toolchain for real-time simulations: GSN-MeteoIO-GEOtop
Toolchain for real-time simulations: GSN-MeteoIO-GEOtopToolchain for real-time simulations: GSN-MeteoIO-GEOtop
Toolchain for real-time simulations: GSN-MeteoIO-GEOtopRiccardo Rigon
 
Druinsky_SIAMCSE15
Druinsky_SIAMCSE15Druinsky_SIAMCSE15
Druinsky_SIAMCSE15Karen Pao
 
以 Leaflet 濫用^H^H呈現開放街圖資料
以 Leaflet 濫用^H^H呈現開放街圖資料以 Leaflet 濫用^H^H呈現開放街圖資料
以 Leaflet 濫用^H^H呈現開放街圖資料Rex Tsai
 
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014Amazon Web Services
 
Ms hw3 %28solution%29
Ms hw3 %28solution%29Ms hw3 %28solution%29
Ms hw3 %28solution%29isat xalapa
 
“Show Me the Garbage!”, Understanding Garbage Collection
“Show Me the Garbage!”, Understanding Garbage Collection“Show Me the Garbage!”, Understanding Garbage Collection
“Show Me the Garbage!”, Understanding Garbage CollectionHaim Yadid
 
Answer togoogleearthuniverseandevrythingelse abbreviated
Answer togoogleearthuniverseandevrythingelse abbreviatedAnswer togoogleearthuniverseandevrythingelse abbreviated
Answer togoogleearthuniverseandevrythingelse abbreviatedShashank Singh
 
Status at 2015, Ruby implementation of openEHR
Status at 2015, Ruby implementation of openEHRStatus at 2015, Ruby implementation of openEHR
Status at 2015, Ruby implementation of openEHRShinji Kobayashi
 
証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議Hiroki Mizuno
 
How to assign the disks in Netapp storage cluster mode 8.X
How to assign the disks in Netapp storage cluster mode 8.XHow to assign the disks in Netapp storage cluster mode 8.X
How to assign the disks in Netapp storage cluster mode 8.XSaroj Sahu
 
Implement a modified algorithm PF in a FPGA
Implement a modified algorithm PF in a FPGAImplement a modified algorithm PF in a FPGA
Implement a modified algorithm PF in a FPGABruno Martínez Bargiela
 
Effective memory management
Effective memory managementEffective memory management
Effective memory managementDenis Zhuchinski
 
だじゃれのススメ
だじゃれのススメだじゃれのススメ
だじゃれのススメNaoko Yamazaki
 

What's hot (20)

Java gc and JVM optimization
Java gc  and JVM optimizationJava gc  and JVM optimization
Java gc and JVM optimization
 
ZFS Log Spacemap - Flushing Algorithm
ZFS Log Spacemap - Flushing AlgorithmZFS Log Spacemap - Flushing Algorithm
ZFS Log Spacemap - Flushing Algorithm
 
bup backup system (2011-04)
bup backup system (2011-04)bup backup system (2011-04)
bup backup system (2011-04)
 
"Работа с утечками в V8", Роман Кривцов, MoscowJS 19
"Работа с утечками в V8", Роман Кривцов, MoscowJS 19"Работа с утечками в V8", Роман Кривцов, MoscowJS 19
"Работа с утечками в V8", Роман Кривцов, MoscowJS 19
 
Building a developer community with containers
Building a developer community with containersBuilding a developer community with containers
Building a developer community with containers
 
Toolchain for real-time simulations: GSN-MeteoIO-GEOtop
Toolchain for real-time simulations: GSN-MeteoIO-GEOtopToolchain for real-time simulations: GSN-MeteoIO-GEOtop
Toolchain for real-time simulations: GSN-MeteoIO-GEOtop
 
Druinsky_SIAMCSE15
Druinsky_SIAMCSE15Druinsky_SIAMCSE15
Druinsky_SIAMCSE15
 
以 Leaflet 濫用^H^H呈現開放街圖資料
以 Leaflet 濫用^H^H呈現開放街圖資料以 Leaflet 濫用^H^H呈現開放街圖資料
以 Leaflet 濫用^H^H呈現開放街圖資料
 
Doc5
Doc5Doc5
Doc5
 
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
 
Mongodb meetup
Mongodb meetupMongodb meetup
Mongodb meetup
 
Ms hw3 %28solution%29
Ms hw3 %28solution%29Ms hw3 %28solution%29
Ms hw3 %28solution%29
 
“Show Me the Garbage!”, Understanding Garbage Collection
“Show Me the Garbage!”, Understanding Garbage Collection“Show Me the Garbage!”, Understanding Garbage Collection
“Show Me the Garbage!”, Understanding Garbage Collection
 
Answer togoogleearthuniverseandevrythingelse abbreviated
Answer togoogleearthuniverseandevrythingelse abbreviatedAnswer togoogleearthuniverseandevrythingelse abbreviated
Answer togoogleearthuniverseandevrythingelse abbreviated
 
Status at 2015, Ruby implementation of openEHR
Status at 2015, Ruby implementation of openEHRStatus at 2015, Ruby implementation of openEHR
Status at 2015, Ruby implementation of openEHR
 
証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議証明駆動開発のたのしみ@名古屋reject会議
証明駆動開発のたのしみ@名古屋reject会議
 
How to assign the disks in Netapp storage cluster mode 8.X
How to assign the disks in Netapp storage cluster mode 8.XHow to assign the disks in Netapp storage cluster mode 8.X
How to assign the disks in Netapp storage cluster mode 8.X
 
Implement a modified algorithm PF in a FPGA
Implement a modified algorithm PF in a FPGAImplement a modified algorithm PF in a FPGA
Implement a modified algorithm PF in a FPGA
 
Effective memory management
Effective memory managementEffective memory management
Effective memory management
 
だじゃれのススメ
だじゃれのススメだじゃれのススメ
だじゃれのススメ
 

Similar to Memory management

Effective memory management
Effective memory managementEffective memory management
Effective memory managementYurii Kotov
 
Taming Go's Memory Usage — and Avoiding a Rust Rewrite
Taming Go's Memory Usage — and Avoiding a Rust RewriteTaming Go's Memory Usage — and Avoiding a Rust Rewrite
Taming Go's Memory Usage — and Avoiding a Rust RewriteScyllaDB
 
"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис Жучинский"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис ЖучинскийFwdays
 
Profiler Guided Java Performance Tuning
Profiler Guided Java Performance TuningProfiler Guided Java Performance Tuning
Profiler Guided Java Performance Tuningosa_ora
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance TuningJeremy Leisy
 
Choosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageChoosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageJelastic Multi-Cloud PaaS
 
Share and Share Alike
Share and Share AlikeShare and Share Alike
Share and Share Alikeawebneck
 
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...
Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...Jelastic Multi-Cloud PaaS
 
Mastering java in containers - MadridJUG
Mastering java in containers - MadridJUGMastering java in containers - MadridJUG
Mastering java in containers - MadridJUGJorge Morales
 
Memory Management in Go: Stack, Heap & Garbage Collector
Memory Management in Go: Stack, Heap & Garbage CollectorMemory Management in Go: Stack, Heap & Garbage Collector
Memory Management in Go: Stack, Heap & Garbage CollectorWednesday Solutions
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Yossi Elkrief
 
#GeodeSummit - Off-Heap Storage Current and Future Design
#GeodeSummit - Off-Heap Storage Current and Future Design#GeodeSummit - Off-Heap Storage Current and Future Design
#GeodeSummit - Off-Heap Storage Current and Future DesignPivotalOpenSourceHub
 
Advanced Namespaces and cgroups
Advanced Namespaces and cgroupsAdvanced Namespaces and cgroups
Advanced Namespaces and cgroupsKernel TLV
 
JVM Garbage Collection Tuning
JVM Garbage Collection TuningJVM Garbage Collection Tuning
JVM Garbage Collection Tuningihji
 
Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Techizzaa
 
Large-Scale, Semi-Automated Go Garbage Collection Tuning at Uber
Large-Scale, Semi-Automated Go Garbage Collection Tuning at UberLarge-Scale, Semi-Automated Go Garbage Collection Tuning at Uber
Large-Scale, Semi-Automated Go Garbage Collection Tuning at UberScyllaDB
 
Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Prashanth Kumar
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Marcos García
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvmPrem Kuppumani
 
Javaday 2022 - Remèdes aux oomkill, warm-ups, et lenteurs pour des conteneur...
Javaday 2022 - Remèdes aux oomkill, warm-ups, et lenteurs pour des conteneur...Javaday 2022 - Remèdes aux oomkill, warm-ups, et lenteurs pour des conteneur...
Javaday 2022 - Remèdes aux oomkill, warm-ups, et lenteurs pour des conteneur...Jean-Philippe BEMPEL
 

Similar to Memory management (20)

Effective memory management
Effective memory managementEffective memory management
Effective memory management
 
Taming Go's Memory Usage — and Avoiding a Rust Rewrite
Taming Go's Memory Usage — and Avoiding a Rust RewriteTaming Go's Memory Usage — and Avoiding a Rust Rewrite
Taming Go's Memory Usage — and Avoiding a Rust Rewrite
 
"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис Жучинский"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис Жучинский
 
Profiler Guided Java Performance Tuning
Profiler Guided Java Performance TuningProfiler Guided Java Performance Tuning
Profiler Guided Java Performance Tuning
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
 
Choosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageChoosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
 
Share and Share Alike
Share and Share AlikeShare and Share Alike
Share and Share Alike
 
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...
Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...
 
Mastering java in containers - MadridJUG
Mastering java in containers - MadridJUGMastering java in containers - MadridJUG
Mastering java in containers - MadridJUG
 
Memory Management in Go: Stack, Heap & Garbage Collector
Memory Management in Go: Stack, Heap & Garbage CollectorMemory Management in Go: Stack, Heap & Garbage Collector
Memory Management in Go: Stack, Heap & Garbage Collector
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM Android Memory , Where is all My RAM
Android Memory , Where is all My RAM
 
#GeodeSummit - Off-Heap Storage Current and Future Design
#GeodeSummit - Off-Heap Storage Current and Future Design#GeodeSummit - Off-Heap Storage Current and Future Design
#GeodeSummit - Off-Heap Storage Current and Future Design
 
Advanced Namespaces and cgroups
Advanced Namespaces and cgroupsAdvanced Namespaces and cgroups
Advanced Namespaces and cgroups
 
JVM Garbage Collection Tuning
JVM Garbage Collection TuningJVM Garbage Collection Tuning
JVM Garbage Collection Tuning
 
Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)Chronicles Of Garbage Collection (GC)
Chronicles Of Garbage Collection (GC)
 
Large-Scale, Semi-Automated Go Garbage Collection Tuning at Uber
Large-Scale, Semi-Automated Go Garbage Collection Tuning at UberLarge-Scale, Semi-Automated Go Garbage Collection Tuning at Uber
Large-Scale, Semi-Automated Go Garbage Collection Tuning at Uber
 
Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvm
 
Javaday 2022 - Remèdes aux oomkill, warm-ups, et lenteurs pour des conteneur...
Javaday 2022 - Remèdes aux oomkill, warm-ups, et lenteurs pour des conteneur...Javaday 2022 - Remèdes aux oomkill, warm-ups, et lenteurs pour des conteneur...
Javaday 2022 - Remèdes aux oomkill, warm-ups, et lenteurs pour des conteneur...
 

More from mitesh_sharma

Aws cost optimized logging using api gateway, sqs and elastic search
Aws  cost optimized logging using api gateway, sqs and elastic searchAws  cost optimized logging using api gateway, sqs and elastic search
Aws cost optimized logging using api gateway, sqs and elastic searchmitesh_sharma
 
Stress driven development
Stress driven developmentStress driven development
Stress driven developmentmitesh_sharma
 
Developing Url Shortener With Dynamic Behaviour Using AWS Lambda
Developing Url Shortener With Dynamic Behaviour Using AWS LambdaDeveloping Url Shortener With Dynamic Behaviour Using AWS Lambda
Developing Url Shortener With Dynamic Behaviour Using AWS Lambdamitesh_sharma
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthroughmitesh_sharma
 
Build and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWSBuild and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWSmitesh_sharma
 
Localize content Devops
Localize content DevopsLocalize content Devops
Localize content Devopsmitesh_sharma
 
Play Framework Logging
Play Framework LoggingPlay Framework Logging
Play Framework Loggingmitesh_sharma
 

More from mitesh_sharma (9)

Aws cost optimized logging using api gateway, sqs and elastic search
Aws  cost optimized logging using api gateway, sqs and elastic searchAws  cost optimized logging using api gateway, sqs and elastic search
Aws cost optimized logging using api gateway, sqs and elastic search
 
Stress driven development
Stress driven developmentStress driven development
Stress driven development
 
Developing Url Shortener With Dynamic Behaviour Using AWS Lambda
Developing Url Shortener With Dynamic Behaviour Using AWS LambdaDeveloping Url Shortener With Dynamic Behaviour Using AWS Lambda
Developing Url Shortener With Dynamic Behaviour Using AWS Lambda
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthrough
 
Build and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWSBuild and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWS
 
Localize content Devops
Localize content DevopsLocalize content Devops
Localize content Devops
 
Play Framework Logging
Play Framework LoggingPlay Framework Logging
Play Framework Logging
 
Akka framework
Akka frameworkAkka framework
Akka framework
 
All about InfluxDB.
All about InfluxDB.All about InfluxDB.
All about InfluxDB.
 

Memory management

  • 2. Memory Related issues, why? ● Each application runs in a linux process, having a Virtual machine (Dalvik VM) running inside it. ● Hard Limit of memeory is present based on device heap size which can be 16MB, 32MB, 64MB. ● If application demand more memory then limit, it gives OutOfMemory error.
  • 3. Memory Related issues, why? ● Some operation which demands a lot of memory even when we don't have. ● Leaking memory i.e. some object which is not under use but still not available for GC. ● Dealing with large bitmaps and loading them together.
  • 4. Heap Sizes on different devices ● Heap Size Limit – G1 – 16MB – Droid - 24MB – Nexus One – 32MB – Galaxy S3 – 64MB
  • 5. Memory Related issues: How to find?
  • 6. How to find memory Leak ● Can be done using logcat logs: – [Reason] [Amount Freed], [Heap Statistics], [External Memory Statistics], [Pause Time] – GC_EXPLICIT freed 4178K, 18% free 26631K/32304K, paused 3ms+9ms, total 166ms ● The GC_EXPLICIT happens when we call the System.gc()
  • 7. Reasons of memory leak GC_FOR_MALLOC/GC_FOR_ALLOC(new name) means that the GC was triggered because there wasn't enough memory left on the heap to perform an allocation. Might be triggered when new objects are being created. GC_EXPLICIT means that the garbage collector has been explicitly asked to collect, instead of being triggered by high water marks in the heap. Happens all over the place, but most likely when a thread is being killed or when a binder communication is taken down. GC_CONCURRENT Triggered when the heap has reached a certain amount of objects to collect. GC_EXTERNAL_ALLOC means that the the VM is trying to reduce the amount of memory used for collectable objects, to make room for more non-collectable. GC_BEFORE_OOM means that the system is running really low on memory, and that there is a final GC performed, in order to avoid calling the low memory killer.
  • 8. Memory Related issues, How to Debug?
  • 9. Debugging ● Check Heap size ● Dump Heap at different points and find items taking lot of heap – using MAT ● Use Allocation Tracker to check what all objects are allocated in a time period : try to analyze
  • 10. Debug using MAT ● Install eclipse plugging : Memory Analyzer ● Dump Heap using DDMS and open it in MAT. ● Check memory usage and places where it is being used. ● Check Histogram : List of number of instances per class ● Dominator tree: Gives domanint node for each memory allocation. ● Gives other useful data for memory analysis.
  • 11. MAT terminology ● Shallow Heap ● Retained Heap ● Dominator tree ●
  • 12. Debug using MAT ● Compare two heap dumps using MAT to identify difference at two instance. – Open the first HPROF file (using File > Open Heap Dump). – Open the Histogram view. – In the Navigation History view, right click on histogram and select Add to Compare Basket. – Check the difference in memory allocation at two instances
  • 14. Adb commands ● Adb shell ps → gives processes running ● adb shell dumpsys meminfo PID-> gives memory info of process ● adb shell cat /proc/meminfo-> gives a summary of the overall memory usage of the system.