垃圾收集器调试 [英] Garbage Collector Debugging

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

问题描述




我在C#中做了一个中等复杂的应用程序,在某些领域,内存为
高达60Mb,当我完成处理时所有的一切,并设置一切为

null并调用GC.Collect,但内存永远不会低于45MB而我是

非常确定我不会分配那么大的内存量。


现在的问题是,是否有某种工具可以让我看到

垃圾收集器里面有什么对象?我怎么知道我是否正确地释放了

资源?


如果我的应用程序看起来像64Mb的ram al用户是

不会安装它。


我需要任何工具来查看GC的内容。


假设我有一个错误,应用程序正在记忆,从来没有发布过如果GC隐藏这个

信息我怎么知道发生了什么?


任何帮助?


谢谢。

Hi,

I did a medium complex application in C#, and in some areas the memory goes
up to 60Mb, when I finish I dispose everything and setting everything to
null and calling GC.Collect, but the memory never goes below 45MB and I''m
pretty sure I''m not allocating that huge amount of memory.

Now the question is, are there some kind of tool that allow to me to see
what objects are inside of Garbage Collector?. How do I know if I freed the
resources properly?.

If my application looks like is taking 64Mb of ram al the time the users are
not going to install it.

I need any kind of tool to see the content of the GC.

Supposed I have a bug and the application is taking memory and never is
released how do I supposed to know what is happening if the GC hide this
information?

Any Help?

Thanks.

推荐答案

你可以做使用分析器:
http://www.scitech.se/memprofiler/


Greetz,

- Rob。


Gustavo Franco写道:
You can do this with a profiler:
http://www.scitech.se/memprofiler/

Greetz,
-- Rob.

Gustavo Franco wrote:


我在C#中做了一个中等复杂的应用程序,在某些方面,
内存高达60Mb,当我完成后我处理了所有内容并且
将所有内容设置为null并调用GC.Collect,但内存从未低于45MB,我很确定我不会分配大量的内存。

如果我的应用程序看起来像64Mb的ram al
用户不打算安装它。

我需要任何工具来查看GC的内容。

据说我有一个错误,应用程序正在记忆,从来没有发布如何我是否应该知道如果GC隐藏这些信息会发生什么?

任何帮助?

谢谢。
Hi,

I did a medium complex application in C#, and in some areas the
memory goes up to 60Mb, when I finish I dispose everything and
setting everything to null and calling GC.Collect, but the memory
never goes below 45MB and I''m pretty sure I''m not allocating that
huge amount of memory.

Now the question is, are there some kind of tool that allow to me to
see what objects are inside of Garbage Collector?. How do I know if I
freed the resources properly?.

If my application looks like is taking 64Mb of ram al the time the
users are not going to install it.

I need any kind of tool to see the content of the GC.

Supposed I have a bug and the application is taking memory and never
is released how do I supposed to know what is happening if the GC
hide this information?

Any Help?

Thanks.



来自MS的那个:
http://msdn.microsoft.com/library/de...mplecsharp.asp


Greetz,

- Rob。


Gustavo Franco写道:
The one from MS:
http://msdn.microsoft.com/library/de...mplecsharp.asp

Greetz,
-- Rob.

Gustavo Franco wrote:


我在C#中做了一个中等复杂的应用程序,在某些领域,内存上升到60Mb,当我完成处理时所有的东西和
设置为null并调用GC.Collect,但内存从未低于45MB,我很确定我不会分配大量的内存。

现在的问题是,是否有某种工具可以让我看看垃圾收集器里面有什么对象?我怎么知道我是否正确地释放了资源?

如果我的应用程序看起来像64Mb的ram al
用户不打算安装它。

我需要任何工具来查看GC的内容。

据说我有一个错误,应用程序正在记忆,从来没有发布如何我是否应该知道如果GC隐藏这些信息会发生什么?

任何帮助?

谢谢。
Hi,

I did a medium complex application in C#, and in some areas the
memory goes up to 60Mb, when I finish I dispose everything and
setting everything to null and calling GC.Collect, but the memory
never goes below 45MB and I''m pretty sure I''m not allocating that
huge amount of memory.

Now the question is, are there some kind of tool that allow to me to
see what objects are inside of Garbage Collector?. How do I know if I
freed the resources properly?.

If my application looks like is taking 64Mb of ram al the time the
users are not going to install it.

I need any kind of tool to see the content of the GC.

Supposed I have a bug and the application is taking memory and never
is released how do I supposed to know what is happening if the GC
hide this information?

Any Help?

Thanks.



警告!


我刚下载,安装并运行了这个Memory Profiler,现在我的系统

是一个常量未知的90%utlization。由于没有明显的原因(没有任务显示任务管理器下的使用情况

而不是系统),它运行速度非常慢

。即使在重新启动后,系统也会以80%的速度运行至
90%!


我几乎无法使用我的电脑,本周我将签订一份巨额合同!这个

非常令人沮丧......有什么建议吗?


-Noah Coad

Microsoft MVP& MCP

Rob Tillie <滚装******** @ student.tul.edu>在消息中写道

新闻:Os ************** @ TK2MSFTNGP10.phx.gbl ...
WARNING!

I just downloaded, installed, and ran this Memory Profiler and now my system
is under a constant unknown 90% utlization. It is running extremely slow
for no apparent reason (no tasks show the utiliztion under Task Manager
other than "System"). Even after a reboot the system is running at 80% to
90%!

I can barely use my computer and I have a huge contract due this week! This
is very frustrating... Any recommendations?

-Noah Coad
Microsoft MVP & MCP
"Rob Tillie" <Ro********@student.tul.edu> wrote in message
news:Os**************@TK2MSFTNGP10.phx.gbl...
你可以这样做剖析器:
http://www.scitech.se/memprofiler/

Greetz,
- Rob。

Gustavo Franco写道:
You can do this with a profiler:
http://www.scitech.se/memprofiler/

Greetz,
-- Rob.

Gustavo Franco wrote:


我在C#中做了一个中等复杂的应用程序,在某些方面,内存上升到60Mb,当我完成后我处理了所有内容并将所有内容设置为null并调用GC.Collect,但是内存
现在的问题是,是否有某种工具允许给我看看垃圾收集器里面有什么物品?我怎么知道我是否正确地释放了资源?

如果我的应用程序看起来像64Mb的ram al
用户不打算安装它。

我需要任何工具来查看GC的内容。

据说我有一个错误,应用程序正在记忆,从来没有发布如何我是否应该知道如果GC隐藏这些信息会发生什么?

任何帮助?

谢谢。
Hi,

I did a medium complex application in C#, and in some areas the
memory goes up to 60Mb, when I finish I dispose everything and
setting everything to null and calling GC.Collect, but the memory
never goes below 45MB and I''m pretty sure I''m not allocating that
huge amount of memory.

Now the question is, are there some kind of tool that allow to me to
see what objects are inside of Garbage Collector?. How do I know if I
freed the resources properly?.

If my application looks like is taking 64Mb of ram al the time the
users are not going to install it.

I need any kind of tool to see the content of the GC.

Supposed I have a bug and the application is taking memory and never
is released how do I supposed to know what is happening if the GC
hide this information?

Any Help?

Thanks.




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

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