.NET Memory Leak, GC Suppress, MASSIVE MEM USAGE

alphalox223

New Member
I am a c# programmer as well as managed/native C/C++.

I've of course have a complete build environment for eraser setup on my dev machine, but, of course, I've been running 6.0.9 from your build. Now, I believe 6.0.9 uses either 2.0 or perhaps 3.5, probably 2.0, but, I think that the garbage collection is simply not executing on disposed objects, or perhaps unmanaged resources are just not being disposed at all.

I have to restart eraser about once a week. Around this time it is usually consuming around 800megabytes of memory. Did this happen in the previous version (pre-shell integration)? Also, it is a known issue that .NET services don't have the same garbage collection as applications...

So, what do you guys think is causing the massive memory usage? I'm really curious since I'm about to roll a .net service with one of my apps so I can get around constant security prompts when my app needs to do something useful. I'm just hesitant since I can see for myself what a .net service does to memory. However, my CLR4 ASP Apps are fine, and thats about as close to a service as you can get...but I believe the GC is still different under ASP. Or is it something else? I haven't bothered to look at the GC code.

Thanks,
 
alphalox223 said:
I've of course have a complete build environment for eraser setup on my dev machine, but, of course, I've been running 6.0.9 from your build. Now, I believe 6.0.9 uses either 2.0 or perhaps 3.5, probably 2.0, but, I think that the garbage collection is simply not executing on disposed objects, or perhaps unmanaged resources are just not being disposed at all.
6.0 uses .NET 3.5. I do dispose all unmanaged resources (I use the using statement quite strictly) and try-finally where using cannot be used. I think this could be something else.

alphalox223 said:
I have to restart eraser about once a week. Around this time it is usually consuming around 800megabytes of memory. Did this happen in the previous version (pre-shell integration)? Also, it is a known issue that .NET services don't have the same garbage collection as applications...
What do you mean by pre-shell integration? Are you able to plot a memory usage vs. time graph for me, indicating relevant events such as when erasures run, perhaps we can find a pattern.

I'm guessing though that this could be the size of your task list. Can you see how big %LOCALAPPDATA%\Eraser\Task List.ersx is on your computer? The entire task list if loaded into memory, so that could explain it.

alphalox223 said:
So, what do you guys think is causing the massive memory usage? I'm really curious since I'm about to roll a .net service with one of my apps so I can get around constant security prompts when my app needs to do something useful. I'm just hesitant since I can see for myself what a .net service does to memory. However, my CLR4 ASP Apps are fine, and thats about as close to a service as you can get...but I believe the GC is still different under ASP. Or is it something else? I haven't bothered to look at the GC code.
I've not really dug into ASP.NET, but I think that yes the GC would have to be substantially different.
 
To add to Joel's point about the Task List, a free space Erase on Drive C: can produce a log with tens of thousands of entries. Clearing a log of this sort significantly reduces the size of the Task List file, and therefore what is read into memory when you restart Eraser.

I have initiated a separate discussion about the form and content of the log on the Programming Forum, so any more detailed discussion of the way the log works probably belongs there.

David
 
Back
Top