为什么我的 Silverlight 应用程序使用如此多的非托管内存?
我有一个相当简单的 Silverlight 应用程序,最近我们收到用户的报告,该应用程序在使用几个小时(4+)后崩溃。我们开始深入研究该应用程序,并注意到该应用程序使用的非托管内存部分一开始非常高,并且继续不受控制地增长。其他堆似乎管理得很好。我做了很多研究,甚至从我的应用程序中删除了所有图像,并且非托管内存继续增长。
此时我只是很困惑到底是什么消耗了我的应用程序中的所有非托管内存以及我可以做些什么。这是我的应用程序在初始加载后的快照,您可以看到它已经使用了超过 100MB 的非托管内存空间。我只是在这里寻找有关哪些对象可以位于非托管内存中以及如何减少我的应用程序正在使用的非托管内存量的任何指导。谢谢!
我使用 .NET Memory Profiler 拍摄了另外一两个快照,看来 Kernel-HeapMemory 是最大的块。不确定这是否有很大帮助,但我想无论如何我都会发布它。
I have a rather simple Silverlight application, lately we've been having reports from users of the application crashing after several hours of use (4+). We started digging into the application and noticed that the un-managed portion of memory being used by the application starts very high and continues to grow unchecked. The other heaps seem to be managed just fine. I've done a lot of research and even went as far removing all images from my application and the un-managed memory continues to grow.
I'm just confused at this point as to what exactly is consuming all the un-managed memory in my application and what I can do about it. Here is a snapshot of my application after initial load, as you can see it's already using over 100MB of un-managed memory space. I'm just looking for any guidance here on what objects could be in un-managed memory and what to do to reduce the amount of un-managed memory my application is using. Thanks!
I've taken another snapshot or two using the .NET Memory Profiler and it appears that the Kernel-HeapMemory is the largest chunk. Not sure if this helps much but I thought I would post it anyway.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过Silverlight 的 CLR 探查器< /a>?我过去曾使用它来解决内存问题,并取得了一些成功。
Have you tried the CLR Profiler for Silverlight? I've used it with some success in the past to troubleshoot memory issues.