How do you know that the gc runs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • GG

    #1

    How do you know that the gc runs

    Is there a way to know when the garbage collection runs? We would like
    to see how an app performs and when various gc levels kick in.

    Thanks



    *** Sent via Developersdex http://www.developersdex.com ***
  • Jeroen Mostert

    #2
    Re: How do you know that the gc runs

    GG wrote:
    Is there a way to know when the garbage collection runs? We would like
    to see how an app performs and when various gc levels kick in.
    >
    I recommend CLR Profiler for that:
    http://www.microsoft.com/downloads/d...6-862B40AA0CD0

    If you really want to know exactly when a GC is happening and what kind of
    GC it is, you'll have to write your own profiler
    (http://msdn2.microsoft.com/library/cc300553). This requires writing
    unmanaged code and is not exactly trivial. It's unlikely to be of more use
    than the info CLR Profiler can give you.

    --
    J.

    Comment

    • Ignacio Machin ( .NET/ C# MVP )

      #3
      Re: How do you know that the gc runs

      On Apr 7, 4:14 pm, GG <GGwrote:
      Is there a way to know when the garbage collection runs? We would like
      to see how an app performs and when various gc levels kick in.
      >
      Thanks
      >
      *** Sent via Developersdexht tp://www.developersd ex.com***
      Are you talking about a kind of event you can call from your code?
      IF so I do not know of any way of doing that.

      Externally you can use any of the profilers available.

      Comment

      • GG

        #4
        Re: How do you know that the gc runs

        This is what I am looking for.
        Thanks



        *** Sent via Developersdex http://www.developersdex.com ***

        Comment

        Working...