为什么CLR两次将程序集映射到虚拟地址空间? [英] Why CLR maps assemblies into the virtual address space twice?

查看:117
本文介绍了为什么CLR两次将程序集映射到虚拟地址空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经在.net 3.5中开发了Windows应用程序.在运行应用程序很多次时,我遇到"内存不足"异常,因为我的应用程序加载了很多程序集.但是,当我在VMMap(http://technet.microsoft.com/zh-cn/sysinternals/dd535533)中观察(应用程序的)过程时,我发现CLR两次将程序集映射到虚拟地址空间,这占据了大多数虚拟地址空间.

谁能帮助我了解为什么CLR两次映射程序集并包含重要的虚拟地址?

此外,是否有任何解决方法?

我正在使用Visual Studio 2008(.net framework 3.5).

-Saurabh

HI All,

I have developed a windows application in .net 3.5. While runing the application many times i encounter "out of memory" exception, since my application loads alot of assemblies. However when i observed the process (of the application) in VMMap (http://technet.microsoft.com/en-us/sysinternals/dd535533) i found CLR maps assemblies into the virtual address space twice, which occupies most of the virtual space.

Can anyone please help me out in understanding that why CLR maps the assemblies twice and cosumes important virtual address?

Moreover if there is any workaround available?

I am using Visual studio 2008 (.net framework 3.5).

-Saurabh

推荐答案

只是想一想:您是否曾尝试在项目的属性/调试"部分中取消选中启用Visual Studio托管过程".由于您遇到了多个调试会话的问题,因此此过程可能是记住"旧引用的过程.
Just a thought: Have you tried unchecking the "Enable Visual Studio hosting process" in the project''s properties/debug section. Since you experience the problem with multiple debug sessions, this process could be the one "remembering" the old references.


这篇关于为什么CLR两次将程序集映射到虚拟地址空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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