A function call another word denotes a process. A procedure call involves passing data and control from one part of the code to another. In addition, it must allocate space for local variables of the process at the time of entry and release the space when it is launched. While data passing, the allocation and release of local variables are implemented by manipulating the program stack.
A stack frame is also called a process activity record, which is a data structure used by the compiler to implement a procedure function call.
The following code, in the main function, does not call the function that causes the virtual machine to restart, but why does the virtual machine restart?
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/82/95/wKioL1dcGBCwhCUDAABO_E6JQVY563.jpg-wh_500x0-wm_3 -wmp_4-s_3338931795.jpg "title=" 36020160611214902752.jpg "alt=" Wkiol1dcgbcwhcudaabo_e6jqvy563.jpg-wh_50 "/>
This reason is related to the stack frame, the following diagram is the resolution of this program
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/82/96/wKiom1dcHDmCQ6gIAAEYouHTt5A551.png-wh_500x0-wm_3 -wmp_4-s_1368994945.png "title=" Untitled. png "alt=" wkiom1dchdmcq6giaaeyouhtt5a551.png-wh_50 "/>
with the knowledge of the stack frame, you can also use B, but you can change the value of the B variable.
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/82/95/wKioL1dcJYDCaZq8AAAwPlaoCqo236.jpg-wh_500x0-wm_3 -wmp_4-s_3250514553.jpg "title=" 36020160611224739637.jpg "alt=" Wkiol1dcjydcazq8aaawplaocqo236.jpg-wh_50 "/>
Here are the results:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/82/95/wKioL1dcJn_yon1eAAAN_Kx3QYo171.jpg "title=" 36020160611225036008.jpg "alt=" Wkiol1dcjn_yon1eaaan_kx3qyo171.jpg "/>
stack frame analysis for small programs