如何检测内存泄漏在哪里? [英] How to detect where a Memory Leak is?

查看:16
本文介绍了如何检测内存泄漏在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大型网站,它似乎占用了所有正在分配的内存.该站点旁边的服务器上没有其他任何内容.在一周内,它会消耗掉 2 场演出并需要重新启动.目前这是使用 IIS 7 的 2008 32 位服务器.我们正在重新安装以使用 64 位并添加更多内存.如果能够追踪发生泄漏的位置,那就太好了.

I have a large website that seems to be sucking up all the memory that is being allocated. There is nothing else on the server beside this site. Within a week it eats away the 2 gigs and requires a restart. Currently this is server 2008 32 bit using IIS 7. We are reinstalling to use 64bit and add more memory. It would be nice to be able to track down where the leaks are occurring.

那么跟踪内存泄漏的最佳做法是什么?

So what is the best practice to tracking memory leaks?

推荐答案

在您的代码上运行分析器.

Run a profiler on your code.

这里有两个不错的选择:

Here are two good options:

RedGate 的内存分析器

Jetbrains dotTrace

我相信这两款产品都有免费试用版.

I believe both products have a free trial.

这篇关于如何检测内存泄漏在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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