- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
RUN-TIME STORAGE.ppt
RUN-TIME STORAGE Chuen-Liang Chen Department of Computer Science and Information Engineering National Taiwan University Taipei, TAIWAN Program layout (1/2) typical program layout each block can be allocated to a “segment” under segmented memory system operand stack is required for some computer; Its size can be determined at compile-time Program layout (2/2) for load-and-go compiler Static allocation space is allocated in fixed location for the life-time of a program applicable only when the number and size of data objects is known at compile-time suitable for global variables literals (or put them on a separate “literal pool” ) the only choice for early language (e.g. without recursion) preferable to address a data object as (DataArea, Offset) and binding DataArea at link-time Heap allocation space is allocated and freed at any time and in any order suitable for dynamic memory allocation/deallocation allocation -- in demand best-fit first-fit circular-first-fit QUIZ: comparison deallocation no deallocation (work for implementations with a large virtual memory) explicit deallocation implicit deallocation single reference reference count mark-and-sweep garbage collection [ + compaction] QUIZ: comparison free-space representation -- bit map, linked list Stack allocation (1/2) suitable for recursive call activation record (AR) -- data space required for a call push / pop, when “call” / “return” example -- procedure p(a:integer) is b: real; c: array (1..10) of real; d,e : array (1..N) of integer; begin b := c(a) * 2.51; end; 2.51 is stored in literal pool dope vector -- fixed size descriptor for dynamic array; containing size and bounds of array (determined at run-time) Stack allocation (2/2) when too many recursive callsT too many AR T too many registers solutions: display registers static and dynamic chains QUIZ: coroutine? QUIZ: variable declaration within block? Display registers (1/2) observation (by scoping rules) --at most one active scope for one
您可能关注的文档
- Email Tracing.ppt
- Emission Accounts.ppt
- Emoticon-based Text Steganography in Chat.ppt
- ENERGY EFFICIENCY IN POWER PLANTS.ppt
- Enforcement mechanisms in the EU 欧盟的执法机制.ppt
- Enron CorpusA New Dataset for Email Classification.ppt
- ERGONOMICS.ppt
- ESS 200CLecture 13The Earth's Ionosphere.ppt
- Eukaryotic and Prokaryotic Cells.ppt
- Evaluating Milk Quality.ppt
- Run-Time Type Identification.ppt
- Sales Management.ppt
- Satellite Communication.ppt
- School of Earth and EnvironmentFACULTY OF ENVIRONMENT.ppt
- Service Operations Management.ppt
- Simple Mail Transfer Protocol(SMTP).ppt
- Simulations of Radio Imaging in the Earth's Magnetosphere.ppt
- Smacking or Reasoning.ppt
- Small Bowel and Appendix.ppt
- SMBL and Blast.ppt
文档评论(0)