linesh Posted March 24, 2005 Posted March 24, 2005 We have a .NET application that is partly VB.NET(1 component) and partly C# (2 components) and seems to use a lot of page files. The appln. is system and memory intensive (does continuous drawing). The PF usage in the task manager grows exponentially while running the appln. and after a point the PF usage reaches the limit and get an UnKnown: System.OutOfMemory Exception. This crashes the application. Are there methods to reduce PF usage for an appln ? Thanks in advance, Linesh Quote
Administrators PlausiblyDamp Posted March 24, 2005 Administrators Posted March 24, 2005 Page file usage just reflects the demands on the system's memory and it isn't down to a single application to control this. You would probably get better mileage trying to figure out why you application is using so many resources. If you are doing a lot of graphics drawing you are probably allocating lots of pens, brushs, graphics objects etc. make sure you are disposing of these things when they are finished with. You may want to have a look at CLR Profiler or similar tools to help identify where allocations are being made / leaks are happening Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
linesh Posted March 24, 2005 Author Posted March 24, 2005 Thanks, I am looking into the tool. Also, does explicitly calling GC.Collect on the garbage collector help? Quote
Administrators PlausiblyDamp Posted March 24, 2005 Administrators Posted March 24, 2005 Search these forums for more information on GC.Collect, but as a rule if you need to call it you are doing something wrong elsewhere. If you are disposing of things correctly you shouldn't need to call GC.Collect yourself. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.