|
|
|
|
|
|
|
Figure 2.50
Register windows. |
|
|
|
|
|
|
|
|
P0 variables) are first assigned to space allocated by a stack organized in memory starting at S0. Suppose variables are assigned to the stack by their complexity: first scalars and constants, then complex structures (arrays, etc.). Then the level P0 routine calls another routine, and the called routine (P1) is assigned space starting at the top of the stack address (S1). Similarly, when a level-one routine calls a second level routine, space is allocated following the level-one routine. Parameters may e passed easily on this stack in memory as the calling routine stores arguments for the caller at the top of its space. This becomes the initialization point for the called routine. The number of call levels at which execution occurs is called a call depth of execution. The average departure from the mean call depth is called the relative call depth. The call depth varies dynamically, and the overall call depth may vary considerably over several programs. However, it appears that most of the program execution occurs with a relative call depth of four or five routines [275] as shown in Figure 2.49. |
|
|
|
|
|