Hey,

The first place where i saw these figures was in
Jeff Richter' book 'Applied MS .NET Framework programming'

http://www.amazon.com/exec/obidos/ASIN/0735614229/qid=1020336068/sr=1-1/ref=
sr_1_1/102-0768102-0848164

Regards,
Ryan

-----Original Message-----
From: Pradeep Tapadiya [mailto:[EMAIL PROTECTED]]
Sent: donderdag 2 mei 2002 02:33
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] How often does Garbage Collection run?


Jim,

Good summary!

Where did you get the size limits for each generation? I had
asked for this information to Microsoft folks via .NET authors
connection some time ago but could not get an answer :-(.

Pradeep
http://www.tapadiya.net/pradeep

----- Original Message -----
From: "Murphy, James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 01, 2002 12:45 PM
Subject: Re: [DOTNET] How often does Garbage Collection run?


> I suspect you knew it wasn't that simple a question...
>
> the GC collects parts of the managed heap at different frequencies.  The
> heap is partitioned into 3 sections called generations.  The idea is that
> collecting a generation is a lot cheaper than collecting the entire heap.
>
> An object lives in one of the generations depending on its "age".  The
> youngest objects are on generation 0, older ones in generation 1 and the
> oldest in generation 2.  Age is the number of collections that have
occurred
> during this objects lifetime.
>
> This algorithm (the ephemeral garbage collector) performs well for the
> typical application.  Its based on the assumption that the newer an object
> is the shorter it lifetime will be.  Conversely the older an object is the
> longer its lifetime.  When an object is newly created it is placed in
> generation 0.  If the collector runs and the object is still in use it is
> promoted to generation 1.
>
> A collection is usually kicked off automatically when each generation hits
a
> threshold limit.  Generation  0 is collected much more frequently than
> generation 1 which is collected much more frequently than generation 2.
> This is because the heap size triggers of the generations:
>
> Typically at AppDomain startup they at:
>
> Generation 0: 256 KB
> Generation 1: 2 MB
> Generation 2: 10 MB
>
> These are tuned at runtime to maximize performance.
>
> The GC also runs when you call GC.Collect(int generation) but doing so
> usually screws with he GC algorithm.
>
> A final collection will also run when the AppDomain unloads.
>
> Jim
>
> > -----Original Message-----
> > From: Farhan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 01, 2002 3:32 PM
> > To: [EMAIL PROTECTED]
> > Subject: [DOTNET] How often does Garbage Collection run?
> >
> >
> > How often does garbage collection run? what condition needs
> > to be true in
> > order for it to run? is there any way to tell when the
> > Garbage collection
> > will run?
> >
> > Thanks,
> > Farhan
> >
> > You can read messages from the DOTNET archive, unsubscribe
> > from DOTNET, or
> > subscribe to other DevelopMentor lists at http://discuss.develop.com.
> >
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.


-------------------------------------
The information included in this message is personal and/or confidential and
intended exclusively for the addressees as stated. This message and/or the
accompanying documents may contain confidential information and should be
handled accordingly. If you are not the intended reader of this message, we
urgently request that you notify Centric immediately and that you delete
this e-mail and any copies of it from your system and destroy any printouts
immediately.
It is forbidden to distribute, reproduce, use or disclose the information in
this e-mail to third parties without obtaining prior permission from
Centric. We expressly point out that there are risks associated with the use
of e-mail. Centric and the companies within the group shall not accept any
liability whatsoever for damage resulting from the use of e-mail. Legally
binding obligations can only arise for Centric by means of a written
instrument, signed by an authorized representative of Centric.
-------------------------------------

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to