Storage organization

During the execution of a program, the same name in the source can denote different data objects in the computer.

The allocation and deallocation of data objects is managed by the run-time support package.

Terminologies

  1. Name storage space: The mapping of a name to a storage space is Called environment
  2. Storage space value: The current value of a storage space is called its state.The association of a name to a storage location is called a binding. Each execution of a procedure is called an activation. If it is a recursive procedure, then several of its activations may exist at the same time.
  3. Life time: The time between the rst and last steps in a procedure. A recursive procedure needs not to call itself directly.

General run time storage layout

Activation record

TemporariesStores temporary and intermediate values of an expression.
Local DataStores local data of the called procedure.
Machine StatusStores machine status such as Registers, Program Counter etc., before the procedure is called.
Control LinkStores the address of activation record of the caller procedure.
Access LinkStores the information of data which is outside the local scope.
Actual ParametersStores actual parameters, i.e., parameters which are used to send input to the called procedure.
Return ValueStores return values.