1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to interprete private bytes and memory leaks in a Progress/.Net application

Discussão em 'StackOverflow' iniciado por fdantas, Agosto 30, 2018.

  1. fdantas

    fdantas Administrator Moderador

    I have a question regarding memory leaks in our application.

    First of all, it's a Progress ABL Application. Progress has added .NET support a couple of years ago, so it's really hard to know where memory leaks are coming from.

    Progress is written in C, so you have an ABL layer, a unmanaged C layer and then .NET. And on top of that we are using Infragistics which is known to have a poor design (with memory leaks).

    In Progress ABL we can track memory leaks by parsing log files. For the .NET side we use Ants Memory Profiler.

    Now, we have gotten some memory leak bug fixes from Progress which help a lot in lowering the number of leaking objects.

    Before the Progress bug fixes this was a list of leaking instances between two snapshots (Between the two snapshots I opened and closed 10 Custom Forms):

    [​IMG]

    This is a list of leaking objects after Progress gave us a hotfix.

    [​IMG]

    As you can see, the Progress Fixes solved some of the leaking objects. Leaking objects seem to have gone down with a factor 10 for the same test. However, if I look at the private bytes, before the Progress fix private bytes went up with 13.1 Mb. After the fix private bytes went up with 5.1 Mb. So not 10 times better as the objects.

    My questions:

    • After the fixes from Progress, there are still lots of objects staying alive. Is this normal? Shouldn't the Instance diff be zero for all objects? I can imagine that in a pure .NET Windows Forms application there might be some objects leaking, but not so many...
    • If the objects go down with a factor 10, shouldn't private bytes also go down with a factor 10? And if not, what is consuming the 5.1 Mb private bytes? If I look at the Size diff (bytes) in Ants, I can't explain 5.1 Mb...
    • Is there a way to profile memory leaks of unmanaged C applications?

    Continue reading...

Compartilhe esta Página