开发者

What is the HostCodeHeap and why are they leaking?

开发者 https://www.devze.com 2023-01-18 18:23 出处:网络
We have .NET application (actually an IronPython app). We noticed that overtime the app becomes bigger in memory and sluggish.

We have .NET application (actually an IronPython app). We noticed that overtime the app becomes bigger in memory and sluggish.

Using WIND开发者_StackOverflow社区BG (!eeheap -loader), we noticed the that the LoaderHeap is getting bigger (150MB increase per day). From the !eeheap output it seems that the increase is due to HostCodeHeap (objects?).

I'd like to know what are these objects and why how can I prevent them from growing to infinity.

Thanks!


They are likely objects created for dynamically emitted code. Several components in the framework do this, and it may well be that IronPython uses some on its own.

I'd heard of similar issues while using Linq-TO-SQL, XML serialization, compiled XSLT transforms and other dynamically generated code.

See also "Leaking Unmanaged Heap Memory" near figure 2 in this MSDN magazine article.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号