CPSC 259 Chapter 7.1: Memory and local memory

29 views2 pages

Document Summary

When using variables, we need to take into account the memory that they are associated with. So basically, variables take up spaces in the computer s memory. They are essentially convenient names like number and alpha in the code but every time a variable is used, it takes up some space. This space is not permanently reserved for the variable, as that would mess things up. So a computer allocates memory to a variable. That is the variable is given an area to store its value. A allocated variable does not need to have a particular value in it. It just needs to have an area to store value, a place to call home, no need for furniture. When the need for a variable ceases, then it is deallocated, the system reclaims the memory from the variable and it no longer has a place to call home.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents