We'll start looking at particular translations after break. A first consideration is how to handle the storage of variables and parameters in memory. As you know, in most modern languages it is possible to call procedures recursively and create new instantiations of the local variables. In addition, when a function exits you no longer need access to its local variables. Typically, values that are only active during the lifetime of a procedure are allocated on a stack and values that are independent of procedure lifetime are allocated on a heap .
Most languages assume one stack and one heap.
In modern architectures, some variables should be stored in registers to improve performance. At the machine level, the stack is simply an area of memory that is allocated and deallocated in a stack-like manner. Typically, the stack starts at the high end of memory and the heap starts at the low end of memory. This design suggests that stacks grown downward and shrink upwards, like bungie cords. A designated register called the stack pointer keeps track of the end of the stack.