views:

33

answers:

1

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

Using WINDBG (!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!

A: 

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.

Lucero
Thanks. Any idea how I can learn anything about these objects using windbg?
Idan Zalzberg
Unfortunately, no, I don't have much experience with WINDBG so I don't know how to track those down. But maybe someone from the IronPython community could help you out; you may be encountering something like http://ironpython.codeplex.com/workitem/20399 or http://ironpython.codeplex.com/workitem/24687
Lucero