Coupon Accepted Successfully!


Runtime Environment


These were completely language independent, i.e. independent of target language. The runtime environment which concentrates on target machines memory structures and maintenance of memory is explained in this topic.

There are mainly three types of environment,

- Static environment used in language like FORTRAN 77

- Stack based environment used in languages like Pascal, C,C++

- Fully dynamic environment used in LISP language

Activation record

The components of activation record are

– Return value - The value which will be returned by the function after performing some action. This value will be stored in this.

– Actual parameters – These are used to send the inputs to the function from caller functions

– Optional control link- pointer to the activation record of the caller function

– Optional access link- pointer to caller local data area to access global data

– Machine status – values of program counter, machine registers, etc

– Local data of function

– Temporaries

Static runtime environment

The data is stored in fixed memory locations during the execution of the program in static runtime environment.

The memory organization of static environment is as shown below,

The calling sequence of the function is,

– Each argument is computed and stored in its appropriate parameter location.

– The return address is saved and jump to the begging of the caller function.

– On return, a simple jump to the return address.


Test Your Skills Now!
Take a Quiz now
Reviewer Name