garbage,The DotNet Garbage Collection

今天开始发第一篇英文原创博客《The DotNet Garbage Collection》
The Garbage Collection is a very important part of DotNet platform.Today we will talk about it. Think about if not GC,DotNet is also called a platform? Although both languages ​​are compiled into MSIL in dotnet, but when the recycling operation was "fighting each other", so that the programming will not _disibledevent=>"Clear" skills - release memory: Enabling Compact algorithm, move the survival objects, change their pointers to make it contiguous in memory, so the free memory contiguous too, and it solved the problem of memory fragmentation When re-allocate memory for other object, CLR do not have to searching the free space in a debris memory, so speed of allocation will be improved.
However, large objects (large object heap) except, GC will not move a giant in-memory, because it knows that the CPU is not cheap. Normally, large objects have a long lifetime, when a large object in the. NET managed heap generation, it is assigned to a special part of the heap, because the performance improved by move large objects less than arrange the heap special. The “Compact” algorithm can improve the speed when re-allocate memory ,if the new object in the heap allocated are compact, then the cache performance will be improved, because objects who was allocated together are often used together (the program locality principle), Therefore, a continuous space for the program is very important.
我是李鸣(Aicken) 请您继续关注我的下一篇文章。
Tags:  garbage

延伸阅读

最新评论

发表评论