.NETGURU
Memory issue with COM+ .NET Managed Component
Messages   Related Types
This message was discovered on microsoft.public.dotnet.distributed_apps.

Post a new message to this list...

Jon Snow
I have a component that I've writen in C# that does a lot of disk
reading and processing. What I'm noticing is that when I have the DLL
as a part of a console test app, my memory usage stays rock solid.
It'll jump to about 58MB of RAM after processing 750MB of files off
the disk. When I plug the same DLL into COM+, I'm noticing that my
RAM usage goes up with every read and is never being freed. For the
same number of MB read from disk, my RAM usage runs up to a gigabyte.
I've profiled the test console application in .NET Memory Profile, and
it looks like I'm doing a very clean job of disposing of my objects
(most everything implements the IDisposable interface). So I'm not
sure what the problem is. Any suggestions?

Thanks,

Jon
Reply to this message...
 
    
Marcelo Dabanovich Lavio
Hi, Jon...

I also had too much memory being used by a COM+ app, but it had queued
components in it, and was not doing disk IO by itself, but it was doing it
under the covers through MSMQ.

My thought is that my problem may be related, in someway, to what is
described here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312118

I think that, maybe, it can be your case, also...

This may sound stupid, but try to add some calls to System.GC.Collect() in
the middle of your processing... This solved my problem, but I'm not sure
why. Maybe it's because when worker(s) thread(s) is(are) blocked(s) in calls
to Collect(), the finalizer thread described in the article is abled to run
and finish it's work.

Hope this helps,
Marcelo

"Jon Snow" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
 
System.GC
System.IDisposable




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification