电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

计算机专业外文翻译

计算机专业外文翻译_第1页
1/8
计算机专业外文翻译_第2页
2/8
计算机专业外文翻译_第3页
3/8
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 object...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

计算机专业外文翻译

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部