HoS - Memory Sections Plagiarized completely from David...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Memory Sections Plagiarized completely from David Zhang Assembled by Dan Roach because David insists on using Pages or Keynote or whatever it is on a Mac, which can't export tables to .ppt files to save a life
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Four Sections of Memory Text - Where the program and functions reside Data - Where global and static variables are stored Run-Time Stack (RTS) - Arguments, non-static local variables, return values Heap - Where dynamically allocated memory (using malloc) is stored
Background image of page 2
When is Memory Actually Allocated? What? When Allocated? When Deallocated? Initialized to? Text Data 0 Stack Heap Call to malloc() Call to free() Unknown The Actual Program When the program begins When the program ends Compiler defined value Global and static variables When the program begins When the program ends Arguments, local variables, return values When the function begins When the function ends Unknown unless initialized/assigned by user Dynamically-allocated memory using malloc
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Examples (Assume global scope, and assume the question is referring to the symbol x)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 5

HoS - Memory Sections Plagiarized completely from David...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online