Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Garbage Collection

Reply
Thread Tools

Garbage Collection

 
 
Kuldeep
Guest
Posts: n/a
 
      09-14-2007
Hi All,

Is there a way to test whether Garbage Collection has been successfully
performed for a ASP.NET application.

Even if there is a tool to check this, please let me know.

Regards,
Kuldeep


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      09-14-2007
there are standard performance counters for how often GC its called, so
just use perfmon. your code can use GC itself.

-- bruce (sqlwork.com)

Kuldeep wrote:
> Hi All,
>
> Is there a way to test whether Garbage Collection has been successfully
> performed for a ASP.NET application.
>
> Even if there is a tool to check this, please let me know.
>
> Regards,
> Kuldeep
>
>

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      09-14-2007
Kuldeep wrote:
> Hi All,
>
> Is there a way to test whether Garbage Collection has been successfully
> performed for a ASP.NET application.
>
> Even if there is a tool to check this, please let me know.
>
> Regards,
> Kuldeep
>


Use the GC.CollectionCount(generation) to get the number of garbage
collections performed on a specific generation. The generations range
from 0 to GC.MaxGeneration.

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
=?Utf-8?B?S3VtYXIuQS5QLlA=?=
Guest
Posts: n/a
 
      09-26-2007
use one of these to find out whether it has successfully run:
nGC- to find the number of times the GC has run.
cbWorkingSetMem-The number of bytes of memory, native and managed, in use
after the last garbage collection.
nCompactions-The number of times the garbage collector has compacted the heap.
nInduced-The number of times the application has called the Collect method.

Performance Monitor(perfmon) is a good tool to get the graphical display,
but you got to have perfmon always open to see the change. It would not be
possible it your application doesnt produce the memory stress(creation of
objects occuping space of 256MB or more), untill then GC wont be called.



"Kuldeep" wrote:

> Hi All,
>
> Is there a way to test whether Garbage Collection has been successfully
> performed for a ASP.NET application.
>
> Even if there is a tool to check this, please let me know.
>
> Regards,
> Kuldeep
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Řyvind Isaksen ASP .Net 1 05-18-2007 09:24 AM
Templates - Garbage In Garbage Not Out ramiro_b@yahoo.com C++ 1 07-25-2005 04:48 PM
Garbage Collection kamran MCSD 1 04-04-2005 10:04 PM
Garbage Collection and Manage Code? Laser Lu ASP .Net 5 01-27-2004 03:48 AM
Debbugging help! (.NET 1.1 Framework Garbage Collection Problems) Cheung, Jeffrey Jing-Yen ASP .Net 3 07-10-2003 07:29 PM



Advertisments