c# - In .NET, Is GC.MaxGeneration Ever Not 2? -


as far understand it, there 3 generations of garbage collection - 0, 1 , 2, versions of .net.

are there circumstances examining gc.maxgeneration yield other 2? there gcs on other frameworks have different number of gc generations?

it should noted gc.maxgeneration being constant application's lifetime in implementation detail:

notes implementers

for implementation, value returned maxgeneration property guaranteed remain constant lifetime of executing application.

this implies not can maxgeneration different 2 in other implementations of .net framework, can vary during program execution (depending on number of generations used garbage collector @ time property getter called).

other implementations can use different garbage collectors depending on circumstances. instance, mono can either use boehm non-generational gc (maxgeneration 0 then), or sgen generational gc (which implements 2 generations, maxgeneration less or equal 1 there).


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -