Share
Embed
JVM Memory usage(Stack vs Heap)
Deepu K Sasidharan
January 23, 2020
Transcript
18 slides
-
JVM Memory usage Heap memory Thread Stack main Employee:new Employee
instance String instance “John” Integer instance 5000 Integer instance 5 name null salary null sales null bonus null this name salary sales -
JVM Memory usage Heap memory Thread Stack main Employee:new Employee
instance String instance “John” Integer instance 5000 Integer instance 5 name null salary null sales null bonus null this name salary sales -
JVM Memory usage Heap memory Thread Stack main Employee:new Employee
instance String instance “John” Integer instance 5000 Integer instance 5 name salary null sales null bonus null this name salary sales -
JVM Memory usage Heap memory Thread Stack main Employee:new Employee
instance String instance “John” Integer instance 5000 Integer instance 5 name salary sales null bonus null this name salary sales -
JVM Memory usage Heap memory Thread Stack main Employee:new Employee
instance String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus null this name salary sales -
JVM Memory usage Heap memory Thread Stack main Employee:new Employee
instance String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus null this name salary sales return void -
JVM Memory usage Heap memory Thread Stack main Employee instance
String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus null john -
JVM Memory usage Heap memory Thread Stack main Employee instance
String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus null findEmployeeBonus john salary 5000 noOfSales 5 -
JVM Memory usage Heap memory Thread Stack main Employee instance
String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus null findEmployeeBonus john salary 5000 noOfSales 5 getBonusPercentage salary 5000 -
JVM Memory usage Heap memory Thread Stack main Employee instance
String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus null findEmployeeBonus john salary 5000 noOfSales 5 getBonusPercentage salary 5000 percentage 500 -
JVM Memory usage Heap memory Thread Stack main Employee instance
String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus null findEmployeeBonus john salary 5000 noOfSales 5 getBonusPercentage salary 5000 percentage 500 return 500 -
JVM Memory usage Heap memory Thread Stack main Employee instance
String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus null findEmployeeBonus john salary 5000 noOfSales 5 bonusPercentage 500 bonus 2500 -
JVM Memory usage Heap memory Thread Stack main Employee instance
String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus null findEmployeeBonus john salary 5000 noOfSales 5 bonusPercentage 500 bonus 2500 return 2500 -
JVM Memory usage Heap memory Thread Stack main Employee instance
String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus john Integer instance 2500 -
JVM Memory usage Heap memory Thread Stack main Employee instance
String instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus john return void Integer instance 2500 -
JVM Memory usage Heap memory Thread Stack Employee instance String
instance “John” Integer instance 5000 Integer instance 5 name salary sales bonus Integer instance 2500