Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

Rust Stack vs Heap usage

Deepu K Sasidharan
March 29, 2020
61k

Rust Stack vs Heap usage

Deepu K Sasidharan

March 29, 2020
Tweet

Transcript

  1. Rust Memory usage Heap Thread stack main frame john Employee:new

    name salary 5000 sales 5 bonus 0 Box<“John”>
  2. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 0 Box<“John”>
  3. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 0 Box<“John”> find_employee_bonus salary no_of_sales 5
  4. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 0 Box<“John”> find_employee_bonus salary no_of_sales 5 bonus_percentage 0
  5. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 0 Box<“John”> find_employee_bonus salary no_of_sales 5 bonus_percentage 0 get_bonus_percentage salary
  6. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 0 Box<“John”> find_employee_bonus salary no_of_sales 5 bonus_percentage 0 get_bonus_percentage salary percentage 500
  7. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 0 Box<“John”> find_employee_bonus salary no_of_sales 5 bonus_percentage 0 get_bonus_percentage salary percentage 500 return 500
  8. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 0 Box<“John”> find_employee_bonus salary no_of_sales 5 bonus_percentage 500
  9. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 0 Box<“John”> find_employee_bonus salary no_of_sales 5 bonus_percentage 500 bonus 2500
  10. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 0 Box<“John”> find_employee_bonus salary no_of_sales 5 bonus_percentage 500 bonus 2500 return 2500
  11. Rust Memory usage Heap Thread stack main frame john name

    salary 5000 sales 5 bonus 2500 Box<“John”>