垃圾收集器“坏了”? [英] Garbage Collector "broken"?

查看:71
本文介绍了垃圾收集器“坏了”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello社区,

我写了一个程序来计算每个月的分布统计数据等。该程序是使用msbuild.exe 4.6.1590.0在.NET 4.5中编译的。当programm在4.6.1590.0下运行时,内存消息最多可达40 MB。当programm
在4.7.3062.0下运行时,内存消息"爆炸"。直到并且它正在增长和增长,直到流程终止而不再使用Handles。

I wrote a programm which calculates distribution statistics etc. for every month. The programm is compiled unter NET 4.5 with msbuild.exe 4.6.1590.0. When programm runs under 4.6.1590.0, the memory ussage is constant up to 40 MB. When programm runs under 4.7.3062.0 the memory ussage "explodes" straight and it is growing and growing until process terminates beacuse of not getting Handles anymore.

使用Redgate的Profiling-Tools,我发现我的Programm(在4.7.3062.0下运行)需要ca. 4-6 MB用于托管内存和其余(增长到"uo到屋顶")非托管内存。

With the Profiling-Tools from Redgate I discovered that my Programm (running under 4.7.3062.0) needs ca. 4-6 MB for the managed Memory and the Rest (which grows "uo to the roof") unmanaged Memory.

当然我连接到数据库(Ms-SQL-Server)。 ..用ODBC。 (它必须是ODBC,因为Datalayer也用于不同的项目中。)

Of course I conect to Database (Ms-SQL-Server)... with ODBC. (It must be ODBC, because the Datalayer is used in different Projects, also.)

基本开发环境的版本:

msbuild.exe          4.6.1590.0

System.data.dll         4.6.1648.0

SQLNCLI11.dll         2011.110.6518.00

msbuild.exe         4.6.1590.0
System.data.dll        4.6.1648.0
SQLNCLI11.dll        2011.110.6518.00

"直到屋顶"的版本 - 环境:

Versions of "up to the roof"-Environment:

msbuild.exe             4.7.3062.0

System.data.dll         4.7.3163.0
$
SQLNCLI11.dll         2011.110.7001.00

msbuild.exe            4.7.3062.0
System.data.dll        4.7.3163.0
SQLNCLI11.dll        2011.110.7001.00

如果微软支持团队成员能够仔细研究我的问题,我将非常高兴。可能是GC中有一个错误?!

I would be very glad, if a Memeber of Microsoft-Support-Team could take a closer look at my Problem. May be there is a bug in the GC?!

问候

推荐答案

嗨虚函数,

Windows软件开发工具包(SDK)提供了一组性能计数器,可用于跟踪应用程序的性能。 

The Windows Software Development Kit (SDK) provides a set of performance counters that you can use to track the performance of an application. 

所以我建议您可以跟踪您的应用程序的性能。并且以下线程提供了许多方法来跟踪它以供参考。

So I would suggest that you could track the performance of your application. and the following thread provide a lot of methods to trace it for your reference.

https://social.msdn.microsoft.com/Forums/vstudio/en-US / 1d93f003-430c-447b-99a5-9995e2b19b99 / how-to-log-or-trace-garbage-collection?forum = netfxbcl

致以最诚挚的问候,

张龙


这篇关于垃圾收集器“坏了”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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