Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Golang Memory usage(Stack vs Heap)

Golang Memory usage(Stack vs Heap)

Deepu K Sasidharan

February 12, 2020
Tweet

More Decks by Deepu K Sasidharan

Other Decks in Technology

Transcript

  1. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 Employee:new name “John” salary 5000 sales 5 bonus 0
  2. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 findEmployeeBonus salary 5000 noOfSales 5
  3. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 findEmployeeBonus salary 5000 noOfSales 5 bonusPercentage 0
  4. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 findEmployeeBonus salary 5000 noOfSales 5 bonusPercentage 0 getBonusPercentage salary 5000
  5. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 findEmployeeBonus salary 5000 noOfSales 5 bonusPercentage 0 getBonusPercentage salary 5000 percentage 500
  6. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 findEmployeeBonus salary 5000 noOfSales 5 bonusPercentage 0 getBonusPercentage salary 5000 percentage 500 return 500
  7. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 findEmployeeBonus salary 5000 noOfSales 5 bonusPercentage 500
  8. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 findEmployeeBonus salary 5000 noOfSales 5 bonusPercentage 500 bonus 2500
  9. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 findEmployeeBonus salary 5000 noOfSales 5 bonusPercentage 500 bonus 2500 return 2500
  10. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 mspan Employee name “John” salary 5000 sales 5 bonus 2500
  11. Go Memory usage Heap Goroutine stack P1 mcache main frame

    john BONUS_PERCENTAGE 10 mspan Employee name “John” salary 5000 sales 5 bonus 2500