GATE CSE · Compiler Design
Runtime Environment Notes & Formulas
Generate GATE-level questions covering activation records, stack allocation, heap allocation, parameter passing mechanisms, symbol table organization, and runtime storage management. Include conceptual and diagram-based questions.
Concept summary for GATE CSE 2027 · 81 practice questions available
📘 Runtime Environment – Concept Summary
1. Memory Organization
- Stack: Stores Activation Records (Automatic vars, Recursion).
- Heap: Dynamic memory (Manual allocation).
- Static/Data: Global/Static variables.
2. Activation Record (Stack Frame)
Contains:
- Actual Parameters.
- Return Values.
- Control Link (Dynamic Link).
- Access Link (Static Link - for nested scopes).
- Saved machine status (registers).
- Local variables and Temps.
3. Allocation Strategies
- Static Allocation: For languages without recursion (FORTRAN). All addresses fixed at compile time.
- Stack Allocation: For recursion. Supports dynamic lifetime.
- Heap Allocation: For data that persists beyond function calls.
4. Scope and Binding
- Static Scope (Lexical): Binding based on program text location.
- Dynamic Scope: Binding based on call sequence at runtime.
5. Static vs. Dynamic Link
- Control Link: Points to the activation record of the caller.
- Access Link: Points to the activation record of the lexically enclosing block.
Practice 81 Runtime Environment questions →