Problem locating leak

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

Moderator: SciTech Software

Problem locating leak

Postby thomas woelfer » Fri Jan 16, 2009 6:31 pm

hi.

i have a problem running my testcases. for each testcase my application is loading a document, processes it and finally discards of the document. this happens ~400 times in a row. while the application is running, the gc heap doesn't seem to have a leak - the gc heap size stays essentially the same for each processed document. however, the working set size and the memory load is increasing all the time. there is an image with some simple stats here: http://muenchen.die.de/memory.gif (the red line is the gc heap, green is working set and blue is memoryLoad.)

i have already verified that there are no leaks in the gc heap using memory profiler. i've also looked at the "native memory" by comparing a snapshot that was taken before the testrun and afterwards - however, there is only a diffenrence of ~ 20 k. so it looks like there isn't a "big" leak in native memory.

(this is a native c++/cli/managed application c#).

however, i still get OutOfMemoryExceptions at some point during the testrun - by looking at the graph it's obvious there must be some kind of leak. however, i haven't got the faintest where to look for whats causing the increase in memory load etc.

any suggestions?

WM_THX
-thomas woelfer
thomas woelfer
 
Posts: 2
Joined: Fri Jan 16, 2009 6:20 pm

Postby Andreas Suurkuusk » Mon Jan 19, 2009 10:26 pm

Since the working set memory of your application increases, but the managed memory doesn't, it indicates that you have a native memory leak. However, if there is a native memory leak, you should be able to see increased memory usage in the native memory view. Is the total amount of memory presented as physical only increasing by 20K for each test?

Can you provide some additional numbers? How big is your working set compared to the amount of memory presented by the native memory view?

Have you looked at the total memory usage including profiler data? If you have a test that is creating a lot of dynamic assemblies, the amount of profiler data will increase (profiler information about classes etc. never gets unloaded).
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 959
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden

Postby thomas woelfer » Tue Jan 20, 2009 4:09 pm

Andreas,

ups - sorry: looks like i had a totally wrong look at the numbers; i do see a leak in private (native) memory right now. guess i'll be able to track that down.

WM_THX
-thomas woelfer
thomas woelfer
 
Posts: 2
Joined: Fri Jan 16, 2009 6:20 pm


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
Sweden


E-mail: mail@scitech.se

Telephone: +46-706868081

cron