Skip to content

Instantly share code, notes, and snippets.

@rogerwschmidt
Last active August 28, 2017 20:07
Show Gist options
  • Select an option

  • Save rogerwschmidt/9bb14356a2ec1dda799e13428267585c to your computer and use it in GitHub Desktop.

Select an option

Save rogerwschmidt/9bb14356a2ec1dda799e13428267585c to your computer and use it in GitHub Desktop.

Intro to memory instructor notes

Objectives

  • Explain what memory is.
  • Explain what the call stack is.
  • Explain what the heap is.
  • Explain what garbage collection is, and why it is important.

Explain what memory is.

Turn to your neighbor and explain what memory is.

Could you clarify Internal memory, Processor Registers and L0-L4 caches more?  Are these essentially RAM, but within the CPU?  Or…. wut?

Explain what the call stack is.

Turn to your neighbor and explain what the call stack is.

Can you also clarify the intersection and differences between call stack and stack frame?
stack frame: valid to say that  a frame is no longer needed when it is done executing and that at that point it is popped off the stack meaning it dissapears forever?

Explain what the heap is.

Turn to your neighbor and explain what the heap is.

Could you please clarify what dynamic allocation is (particularly in regard to heap)?  And also the heap diagram makes it appear that all variables in the stack are pointers to data stored in the heap, is this correct or are some simple data types stored in the stack? 
John York-Erwin [1 hour ago] 
I don't understand the interactions between the stack and the heap. I think I can see how things get added to and extracted from the heap but not why a heap exists.
heap vs. stack: is it valid to say heap is for data structures and stack is for variables? -need more clarification..

Explain what garbage collection is, and why it is important.

Turn to your neighbor and explain what garbage collection is and why it is important.

garbage collection: valid to say that JS scans the stack frames: all of them? if the frame is still on the stack, doesn't it need the data it is referencing, thereby making it a non-candiate for garbage collection?
Garbage Collection: What does the process of garbage collection entail or look like, such as key points or things that define what that process looks like. Or similar like processes to show comparisons and contrasts. (edited)
In the wikipedia article on ARC, it seems to make clear that ARC is not a form of garbage collection, but more a method of dynamic memory management similar to but different from garbage collection.  But the question on garbage collection for the checkpoint seems to imply that ARC is a form of garbage collection?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment