在CLR确定性GC? [英] Deterministic GC in the CLR?

查看:200
本文介绍了在CLR确定性GC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何CLR实现具有确定性垃圾收集?

are there any CLR implementations that have deterministic garbage collection?

在MS CLR GC非确定性的暂停抑制的.Net被用于实时开发了适宜的环境。

Nondeterministic pauses in the MS CLR GC inhibit .Net from being a suitable environment for real-time development.

节拍器GC和BEA的JRockit Java中两个确定性的GC实现,我所知道的。

Metronome GC and BEA JRockit in Java are two deterministic GC implementations that I'm aware of.

不过,有没有任何.NET等效?

But have there any .Net equivalents?

感谢

推荐答案

有没有办法使GC的确定性,从调用期望当然 GC.Collect的()正是每秒钟使用定时器; - )

There is no way to make the GC deterministic, expect of course from calling GC.Collect() exactly every second using a timer ;-).

不过,GC确实包含一个通知机制(因为.NET 3.5 SP1),允许当第2代收集即将发生,你得到通知。你可以阅读一下这里

The GC however does contain a notification mechanism (since .NET 3.5 SP1) that allows you to be notified when a gen 2 collect is about to happen. You can read about it here.

GC的现在还包含多个延迟模式,使得有可能防止任何的GC发生收集。当然,你应该非常小心,但对于实时系统中特别有用。你可以阅读更多关于它这里

The GC now also contains multiple latency modes that make it possible to prevent any GC collects from occurring. Of course you should be very careful with this, but is especially useful for real-time systems. You can read more about it here.

这篇关于在CLR确定性GC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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