垃圾收集的工作方式具体说明了几代人? [英] How Garbage collection works specify including generations?

查看:84
本文介绍了垃圾收集的工作方式具体说明了几代人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

垃圾收集器如何详细解释每个阶段?

How garbage collector works in deep with explaining each phase in detail?

推荐答案

我们不做作业:它是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试,您可能会发现它并不像您想的那么难!

谷歌可以找到很多很多的解释-首先在MSDN上尝试一下,然后从那里开始.
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

There are lots, and lots of explanations out there that Google can find - try the one on MSDN first, and work from there.


简而言之:
垃圾收集器(GC)可被视为.NET Framework的核心.
它管理任何.NET应用程序的内存分配和释放.
为了创建良好的.NET应用程序.
这里有一些很好的链接开始:
垃圾收集器的工作原理-第1部分 [ ^ ]
垃圾收集器的工作原理-第2部分 [ ^ ]


请参考更多链接,以获取详细说明:
垃圾收集器基础知识和性能提示 [垃圾回收:Microsoft .NET Framework中的自动内存管理 [垃圾收集和作用域如何在C#中工作? [^ ]
垃圾回收如何作用于对象引用? [
In short:
The Garbage Collector (GC) can be considered the heart of the .NET Framework.
It manages the allocation and release of memory for any .NET application.
In order to create good .NET applications.
Here are some good links to start with:
How the Garbage Collector works - Part 1[^]
How the Garbage Collector works - Part 2[^]


Please refer some more links, for detailed description:
Garbage Collector Basics and Performance Hints[^]

Garbage Collection: Automatic Memory Management in the Microsoft .NET Framework[^]

How does garbage collection and scoping work in C#?[^]
How garbage collection works on object references?[^]


似乎您正在寻找垃圾收集器的详细工作.

.NET Framework的垃圾回收器管理应用程序的内存分配和释放.每次创建新对象时,公共语言运行库都会从托管堆中为该对象分配内存.只要托管堆中有可用的地址空间,运行时就会继续为新对象分配空间.但是,内存不是无限的.最终,垃圾收集器必须执行收集操作以释放一些内存.垃圾收集器的优化引擎根据所做的分配确定执行收集的最佳时间.垃圾收集器执行收集时,将检查托管堆中应用程序不再使用的对象,并执行必要的操作以回收其内存.

请参考维基百科的基础知识.
http://en.wikipedia.org/wiki/Garbage_collection_(computer_science) [ http://msdn.microsoft.com/en-us/library/0xy59wtx.aspx [ ^ ]
Seems like you are looking for in detailed working of Garbage collector.

The .NET Framework''s garbage collector manages the allocation and release of memory for your application. Each time you create a new object, the common language runtime allocates memory for the object from the managed heap. As long as address space is available in the managed heap, the runtime continues to allocate space for new objects. However, memory is not infinite. Eventually the garbage collector must perform a collection in order to free some memory. The garbage collector''s optimizing engine determines the best time to perform a collection, based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.

Please refer to wikipedia for the basics. http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)[^]

Now after having the basics of Garbage collection, Have a look at how it works with .net
http://msdn.microsoft.com/en-us/library/0xy59wtx.aspx[^]


这篇关于垃圾收集的工作方式具体说明了几代人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆