windows service leak in unmanaged code

Use this forum to discuss subjects that don't belong in the other forums.
Post Reply
Stefano
Posts: 1
Joined: Thu Aug 25, 2011 5:52 am

windows service leak in unmanaged code

Post by Stefano » Thu Aug 25, 2011 6:01 am

Hi
I've a windows service written in VB.NET (.NET 2.0) querying a quite old (and unsupported) VistaDB 2.0 database.
A memory leak is present somewhere in the unmanaged code I presume VistaDB uses (service Private Bytes keep growing, whereas the .CLR total heap size remains almost constant).
Would .NET Memory Profiler be useful in this case, or is this an "out of scope" situation?
thanks in advance
kind regards
stefano

p.s. if .NET Memory Profiler can help, is there any "how to" that I can use to start the leak quest?

Andreas Suurkuusk
Posts: 1000
Joined: Wed Mar 02, 2005 7:53 pm

Re: windows service leak in unmanaged code

Post by Andreas Suurkuusk » Thu Aug 25, 2011 9:52 pm

You can use the unmanaged resources tracker in .NET Memory Profiler to get information about the unmanaged memory leak. The resource tracker can be enabled on the "Decide on the unmanaged resource tracker" page in the "Profile service" wizard.

I also recommend that you make sure that the symbol file locations are correctly initialized using the Symbol File Locations page under Tools->Options. This will allow you to get more detailed native call stacks.

We don't have any "how to" guides related to unmanaged memory leaks, but locating unmanaged memory leaks is similar to managed memory leaks. Collect a few snapshots,e.g. before and after performing some action. Locate resources that have new instances, and investigate how they were created. If the allocation stack is available (i.e. if symbols are available) then you can hopefully find out why there's a memory leak.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests