是.NET垃圾收集系统范围或应用程序范围内? [英] Is the garbage collector in .net system-wide or application-wide?

查看:198
本文介绍了是.NET垃圾收集系统范围或应用程序范围内?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在与我的collegue讨论中,我有一个疑问,在.NET中的垃圾收集器的工作原理系统范围或应用程序范围。

During discussion with my collegue, I got a doubt that the garbage collector in .net works system wide or application wide.

意味着,如果有每个应用程序自身的GC然后将它影响系统性能?

Means if every application having its own GC then will it effect system performance?

我有点困惑了。

推荐答案

每个进程都有自己的托管堆上,这将单独收集。

Each process has its own managed heap, which will be collected separately.

有没有系统范围内的堆,所以不可能有整个系统的GC。

There's no system-wide heap, so there can be no system-wide GC.

(如果你正在运行多个的CLR在同一个进程,他们会各自有各自的GC了。这是一个pretty的罕见情况,但。)

(If you're running multiple CLRs in the same process, they'd each have their own GC too. That's a pretty rare situation though.)

这篇关于是.NET垃圾收集系统范围或应用程序范围内?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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