Lecture 6 Flashcards
What is a binding?
The relation between a syntactic element (keyword) and its meaning during execution
What is binding time?
The time at which the meaning of a syntactic entity is established.
E.g. during language design time (C keyword static), or during programming (C keyword int, because programmer need to specify size).
Compile time (when syntactic elements are linked to external libraries)
What is link time bindings?
Meaning is established when code is linked to external libraries
What is load time bindings?
Meaning is established when program is loaded into memory
What is run-time bindings?
Meaning established when program is executed.
What are early binding times?
All binding times up to the load time, inclusive
What is late binding times?
Run time bindings (start-up time, module, entry time, elaboration time, procedure call time, etc)
How are global values allocated in memory?
Allocated statically, location of object is fixed at load time.
How is procedure memory allocated?
On stack, FIFO
Procedure calls sets up a call frame that is allocated on stack.
This includes callers address, local vars, result vars, arguments for further calls.
How are the components of OZ layed out in memory?
Semantic stack: corresponds to stack-allocated call frames.
Assignment store: heap
What is implicit and explicit memory allocation
Automatic(procedure call/return) and manual(in program) allocation and dealocation
What is object and reference lifetime?
Object: Time between allocation and deallocation
reference: Time between creation, in environment, and deletion of mapping
What is static and dynamic scoping?
Static (lexical): A textual region of the code
Dynamic: A fragment of proceeding computation
When does some garbage collectors remove memory?
When there are no longer references to parts of memory.
What is dangling references?
When a pointer to a local variable is returned. This local variable will be deallocated when function returns, leaving the pointer dangling.