Allocation, Scope Rules




CS152

Chris Pollett

Sep 27, 2021

Outline

Introduction

Static Allocation

Stack Allocation

Runtime Stack

Heap-Based Allocation

Runtime Stack

Heap Storage Management

Dynamic Storage Pools

Handling External Fragmentation

Garbage Collection

Quiz

Which of the following statements is true?

  1. It is impossible to have two leftmost derivations of the same string.
  2. Yacc is a tool to make it easier to create LR(1) parsers in C.
  3. The terms binding lifetime and object lifetime are synonyms.

Scope Rules

Static Scoping