- 1、本文档共10页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
毕业设计(论文)
外文文献翻译
专业 计算机科学与技术 学生姓名 班级 学号 指导教师
信息工程学院
英文原文
How a garbage collector works of Java Language
If you come from a programming language where allocating objects on the heap is expensive, you may naturally assume that Java’s scheme of allocating everything (except primitives) on the heap is also expensive. However, it turns out that the garbage collector can have a significant impact on increasing the speed of object creation. This might sound a bit odd at first—that storage release affects storage allocation—but it’s the way some JVMs work, and it means that allocating storage for heap objects in Java can be nearly as fast as creating storage on the stack in other languages.
For example, you can think of the C++ heap as a yard where each stakes out its own piece of turf object. This real estate can become abandoned sometime later and must be reused. In some JVMs, the Java heap is quite different; it’s more like a conveyor belt that moves forward every time you allocate a new object. This means that object storage allocation is remarkably rapid. The “heap pointer” is simply moved forward into virgin territory, so it’s effectively the same as C++’s stack allocation. (Of course, there’s a little extra overhead for bookkeeping, but it’s nothing like searching for storage.)
You might observe that the heap isn’t in fact a conveyor belt, and if you treat it that way, you’ll start paging memory—moving it on and off disk, so that you can appear to have more memory than you actually do. Paging significantly impacts performance. Eventually, after you create enough objects, you’ll run out of memory. The trick is that the garbage collector steps in, and while it collects the garbage it compacts all the objects in the heap so that you’ve effectively moved the “heap pointer” closer to the beginning of the conveyor belt and farther away from a page fault. The garbage collector rearranges things and makes it possible for the high-speed, infinite-free-heap model to
您可能关注的文档
- 图书管理系统毕业论文1.doc
- 五子棋游戏论文范文,JSP,JAVA,毕业设计.doc
- 信息工程系毕业设计论文指导书-计算机专业.doc
- 医院门诊查询系统论文范文,JSP,JAVA,毕业设计.doc
- 医院信息管理系统论文范文,JSP,JAVA,毕业设计.doc
- 智能弹奏机器人论文.pdf
- 中国移动招聘考试试题汇总集合全附部分答案.doc
- 中文、汉语言文学、小学师资教育毕业论文最新.doc
- 中小企业财务管理存在的问题及对策正文.doc
- 中小企业内部会计控制制度的构建财务管理毕业论文.doc
- 2024-2025学年安徽省亳州市涡阳县高二下学期2月开学考试政治试题(解析版).docx
- 2024-2025学年江西省赣州市上犹县高二下学期开学考试政治试题(解析版).docx
- 2024-2025学年山东省济宁市高二下学期开学考试政治试题(解析版).docx
- 2024-2025学年山西省卓越联盟高三下学期2月开学质量检测政治试题(解析版).docx
- 2024-2025学年新疆乌鲁木齐市高二下学期2月开学考试政治试题(解析版).docx
- 2024-2025学年新疆维吾尔自治区乌鲁木齐地区高三2月大联考文科综合政治试题(解析版).docx
- 2024-2025学年安徽省蚌埠市固镇县高一上学期1月期末考试政治试题 (解析版).docx
- 2024-2025学年江苏省扬州市高三上学期期末检测政治试卷(解析版).docx
- 2024-2025学年江西省吉安市高三上学期期末教学质量检测政治试题(解析版).docx
- 2024-2025学年山东省济宁市高二上学期1月期末考试政治试题(解析版).docx
文档评论(0)