Chapter 6: Runtime System

. Type of a name determines the amount of storage to be set aside

. Address of a storage consists of an offset from the end of an activation record

. Compiler decides location of each activation

. All the addresses can be filled at compile time

. Constraints

- Size of all data objects must be known at compile time

- Recursive procedures are not allowed

- Data structures cannot be created dynamically

The type of a name determines its storage requirement, as outlined in slide 11. The address for this storage is an offset from the procedure's activation record, and the compiler positions the records relative to the target code and to one another (on some computers, it may be possible to leave this relative position unspecified, and let the link editor link the activation records to the executable code). After this position has been decided, the addresses of the activation records, and hence of the storage for each name in the records, are fixed. Thus, at compile time, the addresses at which the target code can find the data it operates upon can be filled in. The addresses at which information is to be saved when a procedure call takes place are also known at compile time. Static allocation does have some limitations:

. Size of data objects, as well as any constraints on their positions in memory, must be available at compile time.

. No recursion, because all activations of a given procedure use the same bindings for local names.

. No dynamic data structures, since no mechanism is provided for run time storage allocation.