Question 86
What is the purpose of the 'Control Link' (Dynamic Link) in a function's activation record?
The Dynamic Link (Control Link) points to the frame of the calling procedure, enabling stack frame unwinding upon function return.
What is the purpose of the 'Control Link' (Dynamic Link) in a function's activation record?
The Dynamic Link (Control Link) points to the frame of the calling procedure, enabling stack frame unwinding upon function return.
What is the purpose of the 'Access Link' (Static Link) in an activation record for languages supporting nested procedures (e.g. Pascal)?
Static Links allow nested procedures to access non-local variables defined in outer lexical parent scopes.
In runtime stack management, dynamic memory allocations like C malloc() or Java new are allocated from which memory region?
Dynamic object allocations whose lifetimes extend beyond the creating function's call frame are stored in the Heap.
Calling convention registers that must be preserved across function calls by the CALLEE if used are called:
Callee-saved registers must be pushed to stack by the called routine before use and restored before returning, preserving caller state.
In expression tree labeling (Sethi-Ullman algorithm), if left child node needs l1 registers and right child needs l2 registers where l1 = l2, how many registers does the parent node require?
Sethi-Ullman rule: If label(left) == label(right) = k, then label(parent) = k + 1.