- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Chapter 7 Runtime Environments Section 0 Overview.ppt
Chapter 7 Runtime Environments Section 2 Storage allocation strategies 4. Stack allocation 4)Stack allocation for nested procedures (3) access links P0 P1 P2 Call P2 Call P1 TOP Top-SP P2 P1 P0 Access link Access link Access link Chapter 7 Runtime Environments Section 2 Storage allocation strategies 4. Stack allocation 4)Stack allocation for nested procedures (3) access links TOP Top-SP P2 P1 P0 Access link Access link Access link P0 P1 P2 Call P2 Call P1 Chapter 7 Runtime Environments Section 2 Storage allocation strategies 4. Stack allocation 4)Stack allocation for nested procedures (4) displays Faster access to global than with access links can be obtained using an array d of pointers to activation records, called a display. Chapter 7 Runtime Environments Section 2 Storage allocation strategies 4. Stack allocation 4)Stack allocation for nested procedures (4) displays Suppose control is in an activation of a procedure pj at nesting depth j, then the display of activation of pj is: j-1 Sp for p0 …… Sp for pj-1 Sp for pj j 0 d[j+1] Chapter 7 Runtime Environments Section 2 Storage allocation strategies 4. Stack allocation 4)Stack allocation for nested procedures (4) displays When a new activation record for a procedure at nesting depth i is setup, we A) save the value of d[i] in the new activation record; B) set d[i] to point to the new activation record. Chapter 7 Runtime Environments Section 2 Storage allocation strategies 4. Stack allocation 4)Stack allocation for nested procedures (5) non-displays non-display of current procedure =non-display of caller+start address of current local activation record Chapter 7 Runtime Environments Section 2 Storage allocation strategies 4. Stack allocation 4)Stack allocation for nested procedures Caller’s SP Calling Return address Amount of parameters Formal parameters Local data Array data Temporaries Returned value Local display global display Chapter 7 Runtime Environments Section 2 Storage allocation strategies
您可能关注的文档
- 5.2光的反射.ppt
- 5.3.1 有机高分子化合物概论.ppt
- 5.5 Hermite插值公式.ppt
- 5.6.热力学第二定律的微观解释 能源和可持续发展.ppt
- 5.7《生活中的圆周运动》.ppt
- 5A, Fun with English, Yilin Edition.ppt
- 6.1 相数,组分数,自由度数.ppt
- 6.1 能源概述 6.1.1 能源的分类和能量的转化.ppt
- 6.2 80C51的串行口.ppt
- 6.2 化石燃料 6.2.1 煤炭.ppt
- Chapter 7 Secure-Use Practices Defensive Best Practices.ppt
- Chapter 7 Solutions and Colloids.ppt
- Chapter 7 Storage.ppt
- Chapter 7 Strings.ppt
- Chapter 7 Television and Cable.ppt
- Chapter 7 Tourism Marketing.ppt
- CHAPTER 7 USING CONSUMER LOANS.ppt
- Chapter 7 Vectors and the Geometry of Space.ppt
- Chapter 7 环境噪声影响评价.ppt
- Chapter 7- Management's Discussion and Analysis (MD&A) .ppt
文档评论(0)