[Mono-list] Which Memory Figures to Trust (Is the memory leak as bad as it would seem)?

Dan Saul daniel.saul at gmail.com
Mon Nov 30 03:49:17 EST 2009


Hi,

I am currently writing a program. It does have a memory leak that I am
searching or (some objects are never deallocated). But this is not what this
thread is about. While searching for this and trying to see how bad it truly
is I have come up with some conflicting information and I would like to ask
the mono community which figures to trust.

All my code is managed, I don't have any unmanaged code. The common
assumption from my research is that you should trust the mono GC to handle
everything. Unfortunately memory is increasing when it really shouldn't.

For example, after running for a time, the process shows as consuming
"417.9MB" in gnome-system-monitor. Which is much too high, but when I have
the program call

double mem = (double)System.GC.GetTotalMemory(true);
mem /= 1024;
mem /= 1024;
Console.WriteLine("GC {0} MB",mem);

It reports the figure as "GC 2.18359375 MB"

So which figures do I trust? They both increase so there is a leak in there
I know. But one figure is orders of magnitude higher then the other! They
also don't increase at the same rate.

Thanks,

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20091130/e003e7ad/attachment.html 


More information about the Mono-list mailing list