windows service leak in unmanaged code

Use this forum to discuss subjects that don't belong in the other forums.

Moderator: SciTech Software

windows service leak in unmanaged code

Postby Stefano » Thu Aug 25, 2011 6:01 am

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

p.s. if .NET Memory Profiler can help, is there any "how to" that I can use to start the leak quest?
Posts: 1
Joined: Thu Aug 25, 2011 5:52 am

Re: windows service leak in unmanaged code

Postby 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
Andreas Suurkuusk
Posts: 980
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

SciTech Software logo

© Copyright 2001-2016. SciTech Software AB
All rights reserved.

SciTech Software AB
Kartvägen 21
SE-175 46 Järfälla


Telephone: +46-706868081