<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-1377</id>
	<title>Nabble - Mono - Garbage Collection</title>
	<updated>2009-02-08T23:01:11Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Mono---Garbage-Collection-f1377.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono---Garbage-Collection-f1377.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-21907861</id>
	<title>Re: Two types of memory issues</title>
	<published>2009-02-08T23:01:11Z</published>
	<updated>2009-02-08T23:01:11Z</updated>
	<author>
		<name>Basile Starynkevitch</name>
	</author>
	<content type="html">&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;jornare wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Error 1)
&lt;br&gt;&amp;quot;Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS&amp;quot;
&lt;br&gt;This error usually seems to be associated with the StringBuilder class, and I have managed to overcome a few of the instances where it crashes by avoiding to use StringBuilder.
&lt;br&gt;&lt;br&gt;So, how do i Increase MAXINCHR and/or MAX_HEAP_SECTS? -And will this be a finite solution?
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
You need to rebuild the Boehm's collector used in MONO. There is some configure options dealing with that.
&lt;br&gt;&lt;br&gt;I forgot the details, and I am not a Mono expert.
&lt;br&gt;&lt;br&gt;Perhaps future Mono releases (and even the current Mono trunk) provide a generational garbage collector which helps with that issue. So, you might try the Mono trunk, with its experimental GC enabled.
&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;Basile STARYNKEVITCH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://starynkevitch.net/Basile/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://starynkevitch.net/Basile/&lt;/a&gt;&lt;br&gt;email: basile&amp;lt;at&amp;gt;starynkevitch&amp;lt;dot&amp;gt;net mobile: +33 6 8501 2359
&lt;br&gt;8, rue de la Faiencerie, 92340 Bourg La Reine, France
&lt;br&gt;*** opinions {are only mines, sont seulement les miennes} ***
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Two-types-of-memory-issues-tp20576154p21907861.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20576154</id>
	<title>Two types of memory issues</title>
	<published>2008-11-19T01:21:33Z</published>
	<updated>2008-11-19T01:21:33Z</updated>
	<author>
		<name>jornare</name>
	</author>
	<content type="html">Hi all!
&lt;br&gt;&lt;br&gt;I'm creating an app which is constantly creating worker-threads (as many as possible) using lots of CPU and heaps of memory allocations.
&lt;br&gt;&lt;br&gt;I have a AMD64bit server with 32GB RAM and 8 cores which it runs on. The program is compiled in .Visual Studio Express on Win64, copied to the server running mono 2.0.1 &amp;nbsp;(C#)
&lt;br&gt;&lt;br&gt;After running a few hours I seem to constantly be running into the same memory issues, which I believe is with the garbage collector or the configuration of it. When it crashes it usually has a
&lt;br&gt;&lt;br&gt;Error 1)
&lt;br&gt;&amp;quot;Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS&amp;quot;
&lt;br&gt;This error usually seems to be associated with the StringBuilder class, and I have managed to overcome a few of the instances where it crashes by avoiding to use StringBuilder.
&lt;br&gt;&lt;br&gt;So, how do i Increase MAXINCHR and/or MAX_HEAP_SECTS? -And will this be a finite solution?
&lt;br&gt;&lt;br&gt;Error 2)
&lt;br&gt;mmap(...PROT_NONE...) failed
&lt;br&gt;Stacktrace:
&lt;br&gt;&amp;nbsp; at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_object_new_f &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ast (intptr) &amp;lt;0x00048&amp;gt;
&lt;br&gt;&amp;nbsp; at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_object_new_f &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ast (intptr) &amp;lt;0xffffffff&amp;gt;
&lt;br&gt;&amp;nbsp; at ......
&lt;br&gt;&lt;br&gt;followed by
&lt;br&gt;&lt;br&gt;&lt;br&gt;Native stacktrace:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mono [0x428742]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/app/glibc/current/lib/libpthread.so.0 [0x7fb65b81d4b0]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/app/glibc/current/lib/libc.so.6(gsignal+0x3b) [0x7fb65b279ffb]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/app/glibc/current/lib/libc.so.6(abort+0x110) [0x7fb65b27b4e0]
&lt;br&gt;&lt;br&gt;&lt;br&gt;Any ideas on this one?
&lt;br&gt;&lt;br&gt;Thanx,
&lt;br&gt;&lt;br&gt;jornare
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Two-types-of-memory-issues-tp20576154p20576154.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20563762</id>
	<title>Re: Compacting GC (again)</title>
	<published>2008-11-18T09:00:45Z</published>
	<updated>2008-11-18T09:00:45Z</updated>
	<author>
		<name>Rodrigo Kumpera</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Nov 18, 2008 at 1:13 PM, Ciprian Mustiata &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=20563762&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ciprian.mustiata@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Hello,&lt;br&gt;&lt;br&gt;Great achievements with the Linear IL runtime and Mono.SIMD optimizations. The linked-list allocators as Visual C++&amp;#39;s runtime new and delete works for a large amount of small objects (the worse case anyway for a C++ program) around 10-40 times slower than the GC allocation in C#. Anyway, mono allocations/deallocations took (again in my microbenchmarks) around of the speed of C++. I&amp;#39;ve happily read about the 2.2+ versions will try to include the compacting GC.&lt;br&gt;

&lt;br&gt;The question is: for microbenchmarks with small objects, that will be the main thing that will be tested when someone will use the CompactingGC (and for typical desktop programs that do processing, like a XML processing logic or &lt;a href=&quot;http://ASP.NET&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;ASP.NET&lt;/a&gt; applications), what should be the typical gain on mater of speed? Can be enabled right now to test it from SVN code?&lt;br&gt;

&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;The new generational gc is faster than the current one but the main advantage is the smaller pause times.&lt;br&gt;&lt;br&gt;Right now you can do a custom build of mono with the new gc enabled. It&amp;#39;s a very experimental feature and it&amp;#39;s neither complete or ready for general use, so use at your our risk.&lt;br&gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;br&gt;Best achievements forward in Mono&amp;#39;s future!&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;Ciprian Mustiata&lt;br&gt;
 
&lt;/font&gt;&lt;br&gt;_______________________________________________&lt;br&gt;
Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=20563762&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=20563762&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compacting-GC-%28again%29-tp20561493p20563762.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20561493</id>
	<title>Compacting GC (again)</title>
	<published>2008-11-18T07:13:46Z</published>
	<updated>2008-11-18T07:13:46Z</updated>
	<author>
		<name>Ciprian Mustiata</name>
	</author>
	<content type="html">Hello,&lt;br&gt;&lt;br&gt;Great achievements with the Linear IL runtime and Mono.SIMD optimizations. The linked-list allocators as Visual C++&amp;#39;s runtime new and delete works for a large amount of small objects (the worse case anyway for a C++ program) around 10-40 times slower than the GC allocation in C#. Anyway, mono allocations/deallocations took (again in my microbenchmarks) around of the speed of C++. I&amp;#39;ve happily read about the 2.2+ versions will try to include the compacting GC.&lt;br&gt;
&lt;br&gt;The question is: for microbenchmarks with small objects, that will be the main thing that will be tested when someone will use the CompactingGC (and for typical desktop programs that do processing, like a XML processing logic or &lt;a href=&quot;http://ASP.NET&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ASP.NET&lt;/a&gt; applications), what should be the typical gain on mater of speed? Can be enabled right now to test it from SVN code?&lt;br&gt;
&lt;br&gt;Best achievements forward in Mono&amp;#39;s future!&lt;br&gt;Ciprian Mustiata&lt;br&gt; 
&lt;br /&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=20561493&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compacting-GC-%28again%29-tp20561493p20561493.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19916297</id>
	<title>Re: Gen GC release target</title>
	<published>2008-10-10T04:08:05Z</published>
	<updated>2008-10-10T04:08:05Z</updated>
	<author>
		<name>Paolo Molaro-2</name>
	</author>
	<content type="html">On 10/09/08 peger wrote:
&lt;br&gt;&amp;gt; Hi, was wondering if anybody knows what the release target is for the
&lt;br&gt;&amp;gt; generational GC into mainline Mono? With ASP.NET supported and the JIT
&lt;br&gt;&amp;gt; drastically improved in 2.0 / 2.next, the current GC seems to be the only
&lt;br&gt;&amp;gt; thing holding us back for some of our (garbage heavy) ASP.NET apps. Any
&lt;br&gt;&amp;gt; guess would be a help too! :-)
&lt;br&gt;&lt;br&gt;Mono 1.9/2.0 have already a few GC speedups.
&lt;br&gt;After 2.2 we'll work on integrating the new GC in the default build.
&lt;br&gt;The release where it will actually be a default will depend on how
&lt;br&gt;well it will behave in the real world (many apps that currently
&lt;br&gt;depend on a non-moving GC will likely break, so it will take time
&lt;br&gt;to fix them, too). We hope for 2.4, but it may happen for 2.6 or later
&lt;br&gt;if there are many problems (boehm GC took years to stabilize after it
&lt;br&gt;was used inside mono).
&lt;br&gt;&lt;br&gt;&amp;gt; Additionally, every though of cannibalizing some other project, say OpenJDK?
&lt;br&gt;&amp;gt; They've definitely got more than an few production-ready GCs, though i'm not
&lt;br&gt;&amp;gt; sure about licensing...
&lt;br&gt;&lt;br&gt;GCs implemented for other systems are basically useless, even if they
&lt;br&gt;have a compatible license (which openjdk doesn't).
&lt;br&gt;One reason is that the a lot of effort is in changing the JIT and the
&lt;br&gt;runtime to support a moving GC, something like openjdk's GC would
&lt;br&gt;increase this effort, since it has different requirements and a much more
&lt;br&gt;complex interface.
&lt;br&gt;Another is that those GCs may be unable or may be completely untuned
&lt;br&gt;for patterns we must implement (pinning, for example).
&lt;br&gt;In some other cases, they don't support things like value types and
&lt;br&gt;managed pointers (again openjdk).
&lt;br&gt;Then there are other issues: we don't want a GC that takes twice as much
&lt;br&gt;memory as the current one (see the shootout results for examples).
&lt;br&gt;Besides openjdk, I'm not sure there is actually any production-ready
&lt;br&gt;GC around that has at least some of the features needed by mono.
&lt;br&gt;&lt;br&gt;lupus
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;-----------------------------------------------------------------
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=19916297&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; debian/rules
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=19916297&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Monkeys do it better
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=19916297&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Gen-GC-release-target-tp19902874p19916297.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19902874</id>
	<title>Gen GC release target</title>
	<published>2008-10-09T09:46:20Z</published>
	<updated>2008-10-09T09:46:20Z</updated>
	<author>
		<name>peger</name>
	</author>
	<content type="html">Hi, was wondering if anybody knows what the release target is for the generational GC into mainline Mono? With ASP.NET supported and the JIT drastically improved in 2.0 / 2.next, the current GC seems to be the only thing holding us back for some of our (garbage heavy) ASP.NET apps. Any guess would be a help too! :-)
&lt;br&gt;&lt;br&gt;Additionally, every though of cannibalizing some other project, say OpenJDK? They've definitely got more than an few production-ready GCs, though i'm not sure about licensing...
&lt;br&gt;&lt;br&gt;Regards &amp; TIA</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Gen-GC-release-target-tp19902874p19902874.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-18999823</id>
	<title>Re: Help with Debuging Interop Code with Mono</title>
	<published>2008-08-15T07:41:47Z</published>
	<updated>2008-08-15T07:41:47Z</updated>
	<author>
		<name>Rodrigo Kumpera</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;You can use the suppresion file for running mono under valgrind, it&amp;#39;s mono/data/mono.supp. It helps&lt;br&gt;a lot by reducing the noise.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Aug 15, 2008 at 11:26 AM, Charlie.M &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=18999823&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;charlie.mas@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;br&gt;
Hi all,&lt;br&gt;
&lt;br&gt;
I am currently trying to debug some code C# I have written. Its a wrapper&lt;br&gt;
around a native library (LibVorbis), I have it working on Windows with .net&lt;br&gt;
fine but when I run it on Mono it Seg Faults. At the moment I think its&lt;br&gt;
likely to be a bug in my code which windows tolerates and Linux doesn&amp;#39;t.&lt;br&gt;
&lt;br&gt;
I tried to find the problem by running my app in Valgrind. Unfortunately it&lt;br&gt;
produces a large number of false positives during normal operation with&lt;br&gt;
Mono, I assume Mono&amp;#39;s GC confuses Valgrind. It also doesn&amp;#39;t appear to show&lt;br&gt;
an obvious source of my problems.&lt;br&gt;
&lt;br&gt;
This happens in the latest release of Mono. However recently I have switched&lt;br&gt;
to using a build I made from SVN and I have also built and installed the&lt;br&gt;
mono debugger. I have been using a recent SVN build of Mono Develop which&lt;br&gt;
includes its new debugger, both for Mono and Native code.&lt;br&gt;
&lt;br&gt;
The Managed stack trace from where my code crashes seems to be completely&lt;br&gt;
random, so I assume its getting screwed up somewhere before it actually&lt;br&gt;
segfaults. However it always segfaults when the garbage collector is running&lt;br&gt;
the GC_mark_from function at line 724 of mark.c according to the Mono&lt;br&gt;
Develop debugger.&lt;br&gt;
&lt;br&gt;
Can someone who&amp;#39;s familiar with the Mono&amp;#39;s GC tell me what its doing at this&lt;br&gt;
point. Also is it possible to figure out which structure / object is causing&lt;br&gt;
the GC problems. Any other suggestions would be greatly appreciated.&lt;br&gt;
&lt;br&gt;
Charlie M&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://www.nabble.com/Help-with-Debuging-Interop-Code-with-Mono-tp18999561p18999561.html&quot; target=&quot;_blank&quot;&gt;http://www.nabble.com/Help-with-Debuging-Interop-Code-with-Mono-tp18999561p18999561.html&lt;/a&gt;&lt;br&gt;

Sent from the Mono - Garbage Collection mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
_______________________________________________&lt;br&gt;
Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=18999823&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=18999823&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Help-with-Debuging-Interop-Code-with-Mono-tp18999561p18999823.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-18999561</id>
	<title>Help with Debuging Interop Code with Mono</title>
	<published>2008-08-15T07:26:04Z</published>
	<updated>2008-08-15T07:26:04Z</updated>
	<author>
		<name>Charlie.M</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I am currently trying to debug some code C# I have written. Its a wrapper around a native library (LibVorbis), I have it working on Windows with .net fine but when I run it on Mono it Seg Faults. At the moment I think its likely to be a bug in my code which windows tolerates and Linux doesn't.
&lt;br&gt;&lt;br&gt;I tried to find the problem by running my app in Valgrind. Unfortunately it produces a large number of false positives during normal operation with Mono, I assume Mono's GC confuses Valgrind. It also doesn't appear to show an obvious source of my problems.
&lt;br&gt;&lt;br&gt;This happens in the latest release of Mono. However recently I have switched to using a build I made from SVN and I have also built and installed the mono debugger. I have been using a recent SVN build of Mono Develop which includes its new debugger, both for Mono and Native code. 
&lt;br&gt;&lt;br&gt;The Managed stack trace from where my code crashes seems to be completely random, so I assume its getting screwed up somewhere before it actually segfaults. However it always segfaults when the garbage collector is running the GC_mark_from function at line 724 of mark.c according to the Mono Develop debugger.
&lt;br&gt;&lt;br&gt;Can someone who's familiar with the Mono's GC tell me what its doing at this point. Also is it possible to figure out which structure / object is causing the GC problems. Any other suggestions would be greatly appreciated.
&lt;br&gt;&lt;br&gt;Charlie M</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Help-with-Debuging-Interop-Code-with-Mono-tp18999561p18999561.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-18816574</id>
	<title>Re: Weird Garbage Collection behaviour with finalizers</title>
	<published>2008-08-04T11:07:51Z</published>
	<updated>2008-08-04T11:07:51Z</updated>
	<author>
		<name>Urs Hanselmann</name>
	</author>
	<content type="html">I solved the memory &amp;quot;leak&amp;quot; by adding
&lt;br&gt;GC.WaitForPendingFinalizers();
&lt;br&gt;inside the loop, but shouldn't this done by the GC internally?
&lt;br&gt;The run time reduced to 20 seconds, but that is 5 times more than without finalizer! Without an EMPTY finalizer.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Weird-Garbage-Collection-behaviour-with-finalizers-tp18812032p18816574.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-18812032</id>
	<title>Weird Garbage Collection behaviour with finalizers</title>
	<published>2008-08-04T07:10:49Z</published>
	<updated>2008-08-04T07:10:49Z</updated>
	<author>
		<name>Urs Hanselmann</name>
	</author>
	<content type="html">Hi!
&lt;p&gt;
I have downloaded the Mono 2.0 preview release today to make some performance comparisions with the MS Runtime. So I wrote a simple application to test massive object creation and the garbace collection auto-cleanup functionality:
&lt;/p&gt;
&lt;code&gt;
using System;&lt;br&gt;
using System.Collections.Generic;&lt;br&gt;
using System.Text;&lt;br&gt;
using System.Timers;&lt;br&gt;
&lt;br&gt;
namespace GarbageCollectionTest&lt;br&gt;
{&lt;br&gt;
    class TestClass&lt;br&gt;
    {&lt;br&gt;
        private string mData;&lt;br&gt;
        public TestClass(int i)&lt;br&gt;
        {&lt;br&gt;
            mData = i.ToString();&lt;br&gt;
        }&lt;br&gt;
        /*~TestClass()&lt;br&gt;
        {&lt;br&gt;
        }*/&lt;br&gt;
    };&lt;br&gt;
&lt;br&gt;
    class Program&lt;br&gt;
    {&lt;br&gt;
        static void Main(string[] args)&lt;br&gt;
        {&lt;br&gt;
            DateTime start = DateTime.Now;&lt;br&gt;
            TestClass class1 = null;&lt;br&gt;
            for (int i = 0; i &lt; 10000000; ++i)&lt;br&gt;
            {&lt;br&gt;
                class1 = new TestClass(i);&lt;br&gt;
                class1 = null;&lt;br&gt;
            }&lt;br&gt;
            Console.WriteLine(&quot;time elapsed: {0}&quot;, DateTime.Now.Subtract(start));&lt;br&gt;
            Console.ReadKey();&lt;br&gt;
        }&lt;br&gt;
    }&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;
&lt;p&gt;
When I run this with the Microsoft Runtime it takes 2250ms.
With the mono runtime it took 4000ms.
The next thing I tried was to add an finalizer to my test class. I started the application with the MS Runtime and it took 5700 ms.
I started the same application with mono and it took 2 minutes while the memory usage was raising continually.
&lt;/p&gt;
&lt;p&gt;
I think that there is a memory leak somewhere in the Mono GC implementation or is there something about the Mono GC that is different to the MS one I missed?
&lt;/p&gt;
Thanks &amp; Regards,&lt;br&gt;
Urs</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Weird-Garbage-Collection-behaviour-with-finalizers-tp18812032p18812032.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-17830010</id>
	<title>Re: GC and multiple inheritance as in C++</title>
	<published>2008-06-13T11:46:43Z</published>
	<updated>2008-06-13T11:46:43Z</updated>
	<author>
		<name>Jason Whittington</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;I believe the answer here is: &amp;#8220;no&amp;#8221;.&amp;nbsp; &amp;nbsp;MI
languages have to find a way to fake it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Microsoft&amp;#8217;s C++/CLI fakes it by not allowing MI for
managed types.&amp;nbsp;&amp;nbsp; MI classes are represented as value types in the CLI
and thus don&amp;#8217;t behave with &amp;#8220;true&amp;#8221; polymorphism.&amp;nbsp; They do
in the sense that C++ code compiled together works correctly, but to other
languages the inheritance is opaque &amp;#8211; calling GetType().BaseType will
just yield System.ValueType.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;The CLR port of Eiffel fakes it by using a [somewhat complex and
arcane] scheme where inheritance in Eiffel is modeled with interfaces in .NET.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;Jason&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=17830010&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-gc-list-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=17830010&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-gc-list-bounces@...&lt;/a&gt;] &lt;b&gt;On Behalf Of &lt;/b&gt;Juro Jon&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Thursday, June 12, 2008 8:36 PM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=17830010&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-gc-list@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [Mono-gc-list] GC and multiple inheritance as in C++&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;I don't know much of CLI
specification so I may be missing something trivial. Java GC assumes that all
pointers point to some &amp;quot;header&amp;quot; to identity the memory object. Since
Java is single inheritance a pointer always points to the head of a full
object, but for C++ multiple inheritance it may be pointing to an embedded part
and need to be adjusted to find the full object. Are you saying that the CLI GC
or typesystem has some way to do this adjustment?&lt;br&gt;
&lt;br&gt;
Thanks&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;On Fri, Jun 13, 2008 at 3:50 AM, David Jeske &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=17830010&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jeske@...&lt;/a&gt;&amp;gt; wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;AFAIK, you don't need C++ MI to have a pointer to something
inside an object&lt;br&gt;
body. This can happen if you take a ref of any instance data in C#.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.java2s.com/Code/CSharp/Language-Basics/CRefandOutParameters.htm&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.java2s.com/Code/CSharp/Language-Basics/CRefandOutParameters.htm&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;br&gt;
-- Juro Jon wrote:&lt;br&gt;
&amp;gt; Hello, I have a question concerning implementation of multiple inheritance
in&lt;br&gt;
&amp;gt; CIL. For a C++ MI object, a pointer can points to inside the object body&lt;br&gt;
&amp;gt; instead of the its head. eg.&lt;br&gt;
&amp;gt; struct A : B, C { }; &amp;nbsp;C* c = new A;&lt;br&gt;
&amp;gt; While Boehm GC detects this kind of reference, is it a supported feature
of&lt;br&gt;
&amp;gt; Mono? If not, what is the suggested way to implement it (eg. what is the&lt;br&gt;
&amp;gt; C++/CLI way) ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=17830010&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GC-and-multiple-inheritance-as-in-C%2B%2B-tp17769541p17830010.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-17840016</id>
	<title>Re: GC and multiple inheritance as in C++</title>
	<published>2008-06-12T18:40:42Z</published>
	<updated>2008-06-12T18:40:42Z</updated>
	<author>
		<name>David Jeske</name>
	</author>
	<content type="html">I think my optimism may have got the better of me. The CLR has a mechanism to
&lt;br&gt;handle internal references, but I don't believe this answers your question or
&lt;br&gt;solves your issue. The CLI GC handles interior references to objects even in C#
&lt;br&gt;for &amp;quot;byref&amp;quot; paramaters, but only for interior references on the stack. Here are
&lt;br&gt;some potentially useful references:
&lt;br&gt;&lt;br&gt;(see the bottom of this for comments on Rotor)
&lt;br&gt;&lt;a href=&quot;http://blogs.msdn.com/joelpob/archive/2004/02/26/80776.aspx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blogs.msdn.com/joelpob/archive/2004/02/26/80776.aspx&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://ksrenevasan.blogspot.com/2005/08/incomplete-rotor-gc-notes.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ksrenevasan.blogspot.com/2005/08/incomplete-rotor-gc-notes.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Partition I, section 12.4.1.5.2, it talks about byref and lifetimes.
&lt;br&gt;Partition II, section 12, it talks about interfaces and mentions MI.
&lt;br&gt;&lt;br&gt;----
&lt;br&gt;&lt;br&gt;However, it occurs to me that in C++ MI you may need interior pointers that are
&lt;br&gt;not on the stack. Your concern may be well-founded, as the snippets I can find
&lt;br&gt;only talk about Rotor tracing interior references which are on the stack.
&lt;br&gt;&lt;br&gt;Perhaps someone with more knowledge can offer a more complete (or accurate)
&lt;br&gt;answer.
&lt;br&gt;&lt;br&gt;-- Juro Jon wrote:
&lt;br&gt;&amp;gt; I don't know much of CLI specification so I may be missing something
&lt;br&gt;&amp;gt; trivial. Java GC assumes that all pointers point to some &amp;quot;header&amp;quot; to
&lt;br&gt;&amp;gt; identity the memory object. Since Java is single inheritance a pointer
&lt;br&gt;&amp;gt; always points to the head of a full object, but for C++ multiple inheritance
&lt;br&gt;&amp;gt; it may be pointing to an embedded part and need to be adjusted to find the
&lt;br&gt;&amp;gt; full object. Are you saying that the CLI GC or typesystem has some way to do
&lt;br&gt;&amp;gt; this adjustment?
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=17840016&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GC-and-multiple-inheritance-as-in-C%2B%2B-tp17769541p17840016.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-17813403</id>
	<title>Re: GC and multiple inheritance as in C++</title>
	<published>2008-06-12T18:36:22Z</published>
	<updated>2008-06-12T18:36:22Z</updated>
	<author>
		<name>Juro Jon</name>
	</author>
	<content type="html">I don&amp;#39;t know much of CLI specification so I may be missing something
trivial. Java GC assumes that all pointers point to some &amp;quot;header&amp;quot; to
identity the memory object. Since Java is single inheritance a pointer
always points to the head of a full object, but for C++ multiple
inheritance it may be pointing to an embedded part and need to be
adjusted to find the full object. Are you saying that the CLI GC or
typesystem has some way to do this adjustment?&lt;br&gt;
&lt;br&gt;Thanks&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Jun 13, 2008 at 3:50 AM, David Jeske &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=17813403&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jeske@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
AFAIK, you don&amp;#39;t need C++ MI to have a pointer to something inside an object&lt;br&gt;
body. This can happen if you take a ref of any instance data in C#.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.java2s.com/Code/CSharp/Language-Basics/CRefandOutParameters.htm&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.java2s.com/Code/CSharp/Language-Basics/CRefandOutParameters.htm&lt;/a&gt;&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;Wj3C7c&quot;&gt;&lt;br&gt;
-- Juro Jon wrote:&lt;br&gt;
&amp;gt; Hello, I have a question concerning implementation of multiple inheritance in&lt;br&gt;
&amp;gt; CIL. For a C++ MI object, a pointer can points to inside the object body&lt;br&gt;
&amp;gt; instead of the its head. eg.&lt;br&gt;
&amp;gt; struct A : B, C { }; &amp;nbsp;C* c = new A;&lt;br&gt;
&amp;gt; While Boehm GC detects this kind of reference, is it a supported feature of&lt;br&gt;
&amp;gt; Mono? If not, what is the suggested way to implement it (eg. what is the&lt;br&gt;
&amp;gt; C++/CLI way) ?&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=17813403&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GC-and-multiple-inheritance-as-in-C%2B%2B-tp17769541p17813403.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-17840014</id>
	<title>Re: GC and multiple inheritance as in C++</title>
	<published>2008-06-12T10:50:56Z</published>
	<updated>2008-06-12T10:50:56Z</updated>
	<author>
		<name>David Jeske</name>
	</author>
	<content type="html">AFAIK, you don't need C++ MI to have a pointer to something inside an object
&lt;br&gt;body. This can happen if you take a ref of any instance data in C#.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.java2s.com/Code/CSharp/Language-Basics/CRefandOutParameters.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.java2s.com/Code/CSharp/Language-Basics/CRefandOutParameters.htm&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- Juro Jon wrote:
&lt;br&gt;&amp;gt; Hello, I have a question concerning implementation of multiple inheritance in
&lt;br&gt;&amp;gt; CIL. For a C++ MI object, a pointer can points to inside the object body
&lt;br&gt;&amp;gt; instead of the its head. eg.
&lt;br&gt;&amp;gt; struct A : B, C { }; &amp;nbsp;C* c = new A;
&lt;br&gt;&amp;gt; While Boehm GC detects this kind of reference, is it a supported feature of
&lt;br&gt;&amp;gt; Mono? If not, what is the suggested way to implement it (eg. what is the
&lt;br&gt;&amp;gt; C++/CLI way) ?
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=17840014&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GC-and-multiple-inheritance-as-in-C%2B%2B-tp17769541p17840014.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-17769541</id>
	<title>GC and multiple inheritance as in C++</title>
	<published>2008-06-10T20:48:54Z</published>
	<updated>2008-06-12T01:18:34Z</updated>
	<author>
		<name>Juro Jon</name>
	</author>
	<content type="html">Hello, I have a question concerning implementation of multiple inheritance in CIL. For a C++ MI object, a pointer can points to inside the object body instead of the its head. eg.
&lt;br&gt;struct A : B, C { }; &amp;nbsp;C* c = new A;
&lt;br&gt;While Boehm GC detects this kind of reference, is it a supported feature of Mono? If not, what is the suggested way to implement it (eg. what is the C++/CLI way) ?
&lt;br&gt;&lt;br&gt;Thanks you</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GC-and-multiple-inheritance-as-in-C%2B%2B-tp17769541p17769541.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-16196539</id>
	<title>Re: -DPARALLEL_MARK and GC_enable_incremental()</title>
	<published>2008-03-20T03:48:50Z</published>
	<updated>2008-03-20T03:48:50Z</updated>
	<author>
		<name>Paolo Molaro-2</name>
	</author>
	<content type="html">On 03/19/08 Jonathan Gagnon wrote:
&lt;br&gt;&amp;gt; I wanted to know how the mono GC behaves on multiprocessor machines. &amp;nbsp;After
&lt;br&gt;&amp;gt; reading some documentation on the Boehm GC, I'm wondering if mono compiles
&lt;br&gt;&amp;gt; the GC with -DPARALLEL_MARK. &amp;nbsp;This allows the collector to run the mark
&lt;br&gt;&amp;gt; phase in parallel, and thus use all the available processors on a
&lt;br&gt;&amp;gt; multi-processor machine (instead of using just one). &amp;nbsp;More details can be
&lt;br&gt;&amp;gt; found here :
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.hpl.hp.com/personal/Hans_Boehm/gc/scale.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hpl.hp.com/personal/Hans_Boehm/gc/scale.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Some time ago I tested a mono version enabled with -DPARALLEL_MARK
&lt;br&gt;on a workload that should have benefited from it and I saw basiccally no
&lt;br&gt;performance improvement on my core 2 duo (there was a slight regression).
&lt;br&gt;For kicks I just tested another case and with parallel marking
&lt;br&gt;enabled performance is orrible (twice as slow).
&lt;br&gt;You can easily test your workload configuring mono with the
&lt;br&gt;--enable-parallel-mark option.
&lt;br&gt;I didn't investigate the cause of the slowdown.
&lt;br&gt;&lt;br&gt;&amp;gt; It seems like they also have generational collection, that can be enable by
&lt;br&gt;&amp;gt; calling GC_enable_incremental. &amp;nbsp;It doesn't seem to be called anywhere in the
&lt;br&gt;&amp;gt; mono sources, so I assume it is not used. &amp;nbsp;Is there a reason why?
&lt;br&gt;&lt;br&gt;GC_enable_incremental has a number of issues that are detailed in the
&lt;br&gt;documentation (mainly unexpected interrupted syscalls: we could deal
&lt;br&gt;with them in the runtime, but the p/invoke code of many programs would
&lt;br&gt;break unless we copy potentially lots of data around: not practical).
&lt;br&gt;&lt;br&gt;lupus
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;-----------------------------------------------------------------
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=16196539&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; debian/rules
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=16196539&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Monkeys do it better
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=16196539&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-DPARALLEL_MARK-and-GC_enable_incremental%28%29-tp16159682p16196539.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-16159682</id>
	<title>-DPARALLEL_MARK and GC_enable_incremental()</title>
	<published>2008-03-19T09:39:15Z</published>
	<updated>2008-03-19T09:39:15Z</updated>
	<author>
		<name>Jonathan Gagnon-2</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META http-equiv=Content-Type content=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;META content=&quot;MSHTML 6.00.6000.16608&quot; name=GENERATOR&gt;&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;DIV&gt;&lt;SPAN class=030270216-19032008&gt;&lt;FONT face=Arial size=2&gt;Hi,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=030270216-19032008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=030270216-19032008&gt;&lt;FONT face=Arial size=2&gt;I wanted to know how 
the mono GC behaves on multiprocessor machines.&amp;nbsp; After reading some 
documentation on the Boehm GC, I'm wondering if mono compiles the GC with 
-DPARALLEL_MARK.&amp;nbsp; This allows the collector to run the mark phase in 
parallel, and thus use all the available processors on a multi-processor machine 
(instead of using just one).&amp;nbsp; More details can be found here 
:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=030270216-19032008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;A href=&quot;http://www.hpl.hp.com/personal/Hans_Boehm/gc/scale.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hpl.hp.com/personal/Hans_Boehm/gc/scale.html&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN class=030270216-19032008&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN class=030270216-19032008&gt;It seems like they 
also have generational collection, that can be enable by calling 
GC_enable_incremental.&amp;nbsp; It doesn't seem to be called anywhere in the mono 
sources, so I assume it is not used.&amp;nbsp; Is there a reason 
why?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN class=030270216-19032008&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN class=030270216-19032008&gt;Thanks,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN class=030270216-19032008&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN class=030270216-19032008&gt;Jonathan&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class=030270216-19032008&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=16159682&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-DPARALLEL_MARK-and-GC_enable_incremental%28%29-tp16159682p16159682.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11979458</id>
	<title>Re: [Mono-dev] Request for backport of garbage collection patch</title>
	<published>2007-07-30T09:33:38Z</published>
	<updated>2007-07-30T09:33:38Z</updated>
	<author>
		<name>Miguel de Icaza-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; Right. The problem is that mono 1.2 fails horribly under wine, whereas
&lt;br&gt;&amp;gt; mono 1.1 works pretty well. I'm working on getting mono 1.2 to run
&lt;br&gt;&amp;gt; under wine, but having a fully-functional 1.1 runtime would help.
&lt;br&gt;&lt;br&gt;It would be interesting to know how Mono 1.2 fails with Wine, there is
&lt;br&gt;not much in this email that we can act on.
&lt;br&gt;&lt;br&gt;&amp;gt; The intention is not to stick with 1.1.*, but use it until wine can
&lt;br&gt;&amp;gt; successfully host a 1.2 runtime.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; matt
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Mono-devel-list mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11979458&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-devel-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-devel-list&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11979458&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-backport-of-garbage-collection-patch-tp11660005p11979458.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11816464</id>
	<title>Re: [Mono-dev] Request for backport of garbage collection patch</title>
	<published>2007-07-26T12:29:57Z</published>
	<updated>2007-07-26T12:29:57Z</updated>
	<author>
		<name>Matt Jones-7</name>
	</author>
	<content type="html">On 7/26/07, Paolo Molaro &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11816464&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 07/17/07 Matt Jones wrote:
&lt;br&gt;&amp;gt; &amp;gt; I'm working on improving mono-under-wine (on the wine side), and I've
&lt;br&gt;&amp;gt; [...]
&lt;br&gt;&amp;gt; &amp;gt; Any chance this patch could be applied to the maintenance branch? The
&lt;br&gt;&amp;gt; &amp;gt; patch applies cleanly to 1.13.8.2.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I really hope you're not basing your improvements on mono 1.13.x: it
&lt;br&gt;&amp;gt; is a really old release which nobody should use at this time
&lt;br&gt;&amp;gt; (especially not to build something new like wine support upon it).
&lt;br&gt;&amp;gt; Use mono version 1.2.4 (or the upcoming 1.2.5).
&lt;/div&gt;&lt;br&gt;Right. The problem is that mono 1.2 fails horribly under wine, whereas
&lt;br&gt;mono 1.1 works pretty well. I'm working on getting mono 1.2 to run
&lt;br&gt;under wine, but having a fully-functional 1.1 runtime would help.
&lt;br&gt;&lt;br&gt;The intention is not to stick with 1.1.*, but use it until wine can
&lt;br&gt;successfully host a 1.2 runtime.
&lt;br&gt;&lt;br&gt;matt
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11816464&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-backport-of-garbage-collection-patch-tp11660005p11816464.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11807003</id>
	<title>Re: [Mono-dev] Request for backport of garbage collection patch</title>
	<published>2007-07-26T03:13:39Z</published>
	<updated>2007-07-26T03:13:39Z</updated>
	<author>
		<name>Paolo Molaro-2</name>
	</author>
	<content type="html">On 07/17/07 Matt Jones wrote:
&lt;br&gt;&amp;gt; I'm working on improving mono-under-wine (on the wine side), and I've
&lt;br&gt;[...]
&lt;br&gt;&amp;gt; Any chance this patch could be applied to the maintenance branch? The
&lt;br&gt;&amp;gt; patch applies cleanly to 1.13.8.2.
&lt;br&gt;&lt;br&gt;I really hope you're not basing your improvements on mono 1.13.x: it
&lt;br&gt;is a really old release which nobody should use at this time
&lt;br&gt;(especially not to build something new like wine support upon it).
&lt;br&gt;Use mono version 1.2.4 (or the upcoming 1.2.5).
&lt;br&gt;&lt;br&gt;lupus
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;-----------------------------------------------------------------
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11807003&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; debian/rules
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11807003&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Monkeys do it better
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11807003&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-backport-of-garbage-collection-patch-tp11660005p11807003.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11763400</id>
	<title>Re: [Mono-dev]   Mono memory problems!</title>
	<published>2007-07-24T07:43:48Z</published>
	<updated>2007-07-24T07:43:48Z</updated>
	<author>
		<name>Paolo Molaro-2</name>
	</author>
	<content type="html">On 07/24/07 Jonathan Gagnon wrote:
&lt;br&gt;&amp;gt; I'm pretty sure that this will fix bug #81727 that I filed a few months ago,
&lt;br&gt;&amp;gt; although I don't have time to test it for the moment.
&lt;br&gt;&lt;br&gt;Thanks, confirmed that issue is fixed as well.
&lt;br&gt;&lt;br&gt;lupus
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;-----------------------------------------------------------------
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11763400&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; debian/rules
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11763400&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Monkeys do it better
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11763400&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11763400.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11779329</id>
	<title>Re: [Mono-dev]   Mono memory problems!</title>
	<published>2007-07-24T06:58:49Z</published>
	<updated>2007-07-24T06:58:49Z</updated>
	<author>
		<name>Jonathan Gagnon-2</name>
	</author>
	<content type="html">I'm pretty sure that this will fix bug #81727 that I filed a few months ago,
&lt;br&gt;although I don't have time to test it for the moment.
&lt;br&gt;&lt;br&gt;Jonathan Gagnon 
&lt;br&gt;&lt;br&gt;-----Message d'origine-----
&lt;br&gt;De : &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11779329&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-devel-list-bounces@...&lt;/a&gt;
&lt;br&gt;[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11779329&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-devel-list-bounces@...&lt;/a&gt;] De la part de Miguel de
&lt;br&gt;Icaza
&lt;br&gt;Envoyé : Wednesday, July 18, 2007 8:17 PM
&lt;br&gt;À : David Wolinsky
&lt;br&gt;Cc : Andreas Färber; Peer-to-peer networking group discussions;
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11779329&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mono-gc-list@...&lt;/a&gt;; mono-devel
&lt;br&gt;Objet : Re: [Mono-dev] [Mono-gc-list] Mono memory problems!
&lt;br&gt;&lt;br&gt;Hello folks,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Thanks for tracking this problem down.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Thanks for pointing out the comment in the source code; &amp;nbsp;I went and
&lt;br&gt;re-read the documentation and I clearly did not understand it the first time
&lt;br&gt;over, because the leak was documented to happen only in the .NET 1.0 and 1.1
&lt;br&gt;scenarios, not on the 2.0 scenario.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; So the fix that takes ownership is correct. &amp;nbsp; &amp;nbsp;I tidied up the patch
&lt;br&gt;a little bit as well. &amp;nbsp; The fix is now on svn, thanks again for tracking
&lt;br&gt;this down.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; In fact, I was able to fix the problem.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; For some reason in WaitHandle.cs, the line...
&lt;br&gt;&amp;gt; safe_wait_handle = new SafeWaitHandle (value, false); should be...
&lt;br&gt;&amp;gt; safe_wait_handle = new SafeWaitHandle (value, true); (at least it 
&lt;br&gt;&amp;gt; makes sense according to other docs I read)...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; second... in SafeWaitHandle.cs, the line ...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NativeEventCalls.CloseEvent_internal 
&lt;br&gt;&amp;gt; (DangerousGetHandle()); should be...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NativeEventCalls.CloseEvent_internal (handle);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The second one is kind of silly because Release gets called only after 
&lt;br&gt;&amp;gt; refcount == 0, but calling DangerousGetHandle throws an exception if 
&lt;br&gt;&amp;gt; refcount == 0.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I think there is still a problem of the array of wapi handles not 
&lt;br&gt;&amp;gt; being shrunk down, but that complexity is beyond me.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; David
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Andreas Färber wrote:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Am 18.07.2007 um 19:54 schrieb David Wolinsky:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; That case leaks as well.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; David
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Miguel de Icaza wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; re = new AutoResetEvent(false);
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; re.Close();
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; That depends on the finalizer to run to release memory from the 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; unmanaged side, since AutoResetEvent implements IDisposable you 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; should use it like this:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; using (re = AutoResetEvent (false)) { &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Doesn't Close() call Dispose()? At least for the Stream classes it 
&lt;br&gt;&amp;gt; &amp;gt; should.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Andreas
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Mono-devel-list mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11779329&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-devel-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-devel-list&lt;/a&gt;&lt;/div&gt;_______________________________________________
&lt;br&gt;Mono-devel-list mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11779329&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-devel-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-devel-list&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11779329&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11779329.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11677887</id>
	<title>Re: [Mono-dev]   Mono memory problems!</title>
	<published>2007-07-18T15:16:59Z</published>
	<updated>2007-07-18T15:16:59Z</updated>
	<author>
		<name>David Isaac Wolinsky</name>
	</author>
	<content type="html">Bugzilla report and patch
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;David
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://bugzilla.ximian.com/show_bug.cgi?id=82134&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bugzilla.ximian.com/show_bug.cgi?id=82134&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11677887&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11677887.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11677122</id>
	<title>Re: [Mono-dev]   Mono memory problems!</title>
	<published>2007-07-18T14:30:54Z</published>
	<updated>2007-07-18T14:30:54Z</updated>
	<author>
		<name>David Isaac Wolinsky</name>
	</author>
	<content type="html">In fact, I was able to fix the problem.
&lt;br&gt;&lt;br&gt;For some reason in WaitHandle.cs, the line...
&lt;br&gt;safe_wait_handle = new SafeWaitHandle (value, false);
&lt;br&gt;should be...
&lt;br&gt;safe_wait_handle = new SafeWaitHandle (value, true);
&lt;br&gt;(at least it makes sense according to other docs I read)...
&lt;br&gt;&lt;br&gt;second... in SafeWaitHandle.cs, the line ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NativeEventCalls.CloseEvent_internal (DangerousGetHandle());
&lt;br&gt;should be...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NativeEventCalls.CloseEvent_internal (handle);
&lt;br&gt;&lt;br&gt;The second one is kind of silly because Release gets called only after 
&lt;br&gt;refcount == 0, but calling DangerousGetHandle throws an exception if 
&lt;br&gt;refcount == 0.
&lt;br&gt;&lt;br&gt;I think there is still a problem of the array of wapi handles not being 
&lt;br&gt;shrunk down, but that complexity is beyond me.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;David
&lt;br&gt;&lt;br&gt;Andreas Färber wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Am 18.07.2007 um 19:54 schrieb David Wolinsky:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; That case leaks as well.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt; David
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Miguel de Icaza wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; re = new AutoResetEvent(false);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; re.Close();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; That depends on the finalizer to run to release memory from the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; unmanaged side, since AutoResetEvent implements IDisposable you should
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; use it like this:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; using (re = AutoResetEvent (false)) { &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Doesn't Close() call Dispose()? At least for the Stream classes it 
&lt;br&gt;&amp;gt; should.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Andreas
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11677122&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11677122.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11673804</id>
	<title>Re: [Mono-dev]   Mono memory problems!</title>
	<published>2007-07-18T11:54:49Z</published>
	<updated>2007-07-18T11:54:49Z</updated>
	<author>
		<name>David Isaac Wolinsky</name>
	</author>
	<content type="html">That case leaks as well.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;David
&lt;br&gt;&lt;br&gt;Miguel de Icaza wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; namespace Ipop {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; public class IPOP_Common {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; public static void Main() {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; AutoResetEvent re = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(true) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; re = new AutoResetEvent(false);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; re.Close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; blows up memory
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That depends on the finalizer to run to release memory from the
&lt;br&gt;&amp;gt; unmanaged side, since AutoResetEvent implements IDisposable you should
&lt;br&gt;&amp;gt; use it like this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 	using (re = AutoResetEvent (false)) {	
&lt;br&gt;&amp;gt; 		...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Miguel
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; whereas ...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; using System.Security.Cryptography;
&lt;br&gt;&amp;gt;&amp;gt; using System;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; namespace Ipop {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; public class IPOP_Common {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; public static void Main() {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(true) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] key = new byte[1024];
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rng.GetBytes(key);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; This doesn't.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; David Wolinsky wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; We run this software on system where memory is a concern. &amp;nbsp;The data that 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; we presented is our test case system that has 50 nodes all running in 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the same mono process. &amp;nbsp;We run only a single node at each site which 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; initially starts at ~15 MB, we've seen it swell to well over 300 MBs in 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a period of less than a week. &amp;nbsp;Since this must be used in production 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; environments and is meant to be extremely lightweight we can forgive a 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; small memory portion like 15 MB, since it has relatively no processing 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; overhead, but at over 300 MBs our processes are often stopped by the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; remote admin and we are told to clean up the problem.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Since this seems to be a problem of using a non-compacting gc, do you 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; know where the compacting gc is, so that we could at least test it out. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I searched the SVN and found no clues of it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Also, I should correct myself, the results for memory consumption were 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; not directly related to the test that grows at 25kB/sec. &amp;nbsp;I found this 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; out after posting the data, I am running heap-shot right now with the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; correct test and it has grown 100MB in less than 1 hour.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; David
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Alan McGovern wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Well, after 12 hours at a consistent 25kB/sec, you'd expect to have 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; over 1 gig of memory allocated. As you don't, i think what you're 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; seeing is just 'normal usage' for the non-compacting GC that mono 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; uses. I have a similar app which uses sockets extensively (50-150 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; simultaneous connections) &amp;nbsp;and i can assure you that memory usage 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; doesn't get unbearably large. It'd be interesting to see the logs but 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; i don't think there's much to be worried about.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Alan.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On 7/18/07, *David Wolinsky* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Initially 45 MB, 12 hours later 147 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Another developer has the heap-shot logs, I'll post those as soon as
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; possible.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Alan McGovern wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Could you post up the detailed stats from heapshot? After the 12
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; hour
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; run, how much memory are you using? Are we talking in the gigabyte
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; range, or megabyte range?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Alan.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; On 7/18/07, *David Wolinsky* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; My lab works on a peer-to-peer network overlay and we've noticed
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; recently significant memory issues. &amp;nbsp;Some background...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; This application is constantly creating new objects and shortly
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; thereafter deleting (removing reference to) them
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Using a sample run with 150 threads running...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Mono on Linux has a growth rate of ~25 KB per second with a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; base
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; of 50MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; (y = 25K *x + 50M)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; .NET on Windows stabilizes at 35 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We ran heap-shot with Linux and found that in a 12 hour
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; period it
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; reported this...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; start:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; objects: 58,823
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,838,426 bytes
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; end:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; objects: 59,925
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,862,336
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We have run mono with GC_MAXIMUM_HEAP_SIZE and the memory size
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; (RES) got
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; significantly bigger than it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; I have searched for the Compacting GC with no luck, we would
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; really like
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; to see if it would help our problem.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; The only operating system resources we're using are Sockets, but
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; we use
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; them VERY heavily!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; If anyone has any suggestions, we'd be open to test out
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; anything
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; at this
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; point!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We are leaning towards an issue in unmanaged memory and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; possibly a bug
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; in mono.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Best regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; ps, I fwded this to gc and devel list because gc list looks
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; quite
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; dead.... sorry for the duplication
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Mono-devel-list mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-devel-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-devel-list&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; Mono-devel-list mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-devel-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-devel-list&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11673804&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11673804.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11671421</id>
	<title>Re: [Mono-dev] Mono memory problems!</title>
	<published>2007-07-18T09:49:29Z</published>
	<updated>2007-07-18T09:49:29Z</updated>
	<author>
		<name>David Isaac Wolinsky</name>
	</author>
	<content type="html">FYI, this case is only triggered when using gmcs and not mcs.
&lt;br&gt;&lt;br&gt;David
&lt;br&gt;&lt;br&gt;David Wolinsky wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; We've isolated the problem down to AutoResetEvent...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; using System;
&lt;br&gt;&amp;gt; using System.Threading;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; namespace Ipop {
&lt;br&gt;&amp;gt; &amp;nbsp;public class IPOP_Common {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;public static void Main() {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;AutoResetEvent re = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(true) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;re = new AutoResetEvent(false);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;re.Close();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; blows up memory
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; whereas ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; using System.Security.Cryptography;
&lt;br&gt;&amp;gt; using System;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; namespace Ipop {
&lt;br&gt;&amp;gt; &amp;nbsp;public class IPOP_Common {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;public static void Main() {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(true) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;byte[] key = new byte[1024];
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rng.GetBytes(key);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp;}
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This doesn't.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; David Wolinsky wrote:
&lt;br&gt;&amp;gt;&amp;gt; We run this software on system where memory is a concern. &amp;nbsp;The data 
&lt;br&gt;&amp;gt;&amp;gt; that we presented is our test case system that has 50 nodes all 
&lt;br&gt;&amp;gt;&amp;gt; running in the same mono process. &amp;nbsp;We run only a single node at each 
&lt;br&gt;&amp;gt;&amp;gt; site which initially starts at ~15 MB, we've seen it swell to well 
&lt;br&gt;&amp;gt;&amp;gt; over 300 MBs in a period of less than a week. &amp;nbsp;Since this must be 
&lt;br&gt;&amp;gt;&amp;gt; used in production environments and is meant to be extremely 
&lt;br&gt;&amp;gt;&amp;gt; lightweight we can forgive a small memory portion like 15 MB, since 
&lt;br&gt;&amp;gt;&amp;gt; it has relatively no processing overhead, but at over 300 MBs our 
&lt;br&gt;&amp;gt;&amp;gt; processes are often stopped by the remote admin and we are told to 
&lt;br&gt;&amp;gt;&amp;gt; clean up the problem.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Since this seems to be a problem of using a non-compacting gc, do you 
&lt;br&gt;&amp;gt;&amp;gt; know where the compacting gc is, so that we could at least test it 
&lt;br&gt;&amp;gt;&amp;gt; out. &amp;nbsp;I searched the SVN and found no clues of it.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Also, I should correct myself, the results for memory consumption 
&lt;br&gt;&amp;gt;&amp;gt; were not directly related to the test that grows at 25kB/sec. &amp;nbsp;I 
&lt;br&gt;&amp;gt;&amp;gt; found this out after posting the data, I am running heap-shot right 
&lt;br&gt;&amp;gt;&amp;gt; now with the correct test and it has grown 100MB in less than 1 hour.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt; David
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Alan McGovern wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Well, after 12 hours at a consistent 25kB/sec, you'd expect to have 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; over 1 gig of memory allocated. As you don't, i think what you're 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; seeing is just 'normal usage' for the non-compacting GC that mono 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; uses. I have a similar app which uses sockets extensively (50-150 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; simultaneous connections) &amp;nbsp;and i can assure you that memory usage 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; doesn't get unbearably large. It'd be interesting to see the logs 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; but i don't think there's much to be worried about.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Alan.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On 7/18/07, *David Wolinsky* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Initially 45 MB, 12 hours later 147 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Another developer has the heap-shot logs, I'll post those as 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; soon as
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; possible.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Alan McGovern wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Could you post up the detailed stats from heapshot? After the 12
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; hour
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; run, how much memory are you using? Are we talking in the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; gigabyte
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; range, or megabyte range?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Alan.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; On 7/18/07, *David Wolinsky* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; My lab works on a peer-to-peer network overlay and we've 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; noticed
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; recently significant memory issues. &amp;nbsp;Some background...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; This application is constantly creating new objects and 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; shortly
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; thereafter deleting (removing reference to) them
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Using a sample run with 150 threads running...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Mono on Linux has a growth rate of ~25 KB per second with a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; base
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; of 50MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; (y = 25K *x + 50M)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; .NET on Windows stabilizes at 35 MB
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We ran heap-shot with Linux and found that in a 12 hour
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; period it
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; reported this...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; start:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; objects: 58,823
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,838,426 bytes
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; end:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; objects: 59,925
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,862,336
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We have run mono with GC_MAXIMUM_HEAP_SIZE and the memory 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; size
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; (RES) got
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; significantly bigger than it.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; I have searched for the Compacting GC with no luck, we would
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; really like
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; to see if it would help our problem.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; The only operating system resources we're using are 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Sockets, but
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; we use
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; them VERY heavily!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; If anyone has any suggestions, we'd be open to test out
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; anything
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; at this
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; point!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We are leaning towards an issue in unmanaged memory and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; possibly a bug
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; in mono.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Best regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; ps, I fwded this to gc and devel list because gc list looks
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; quite
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; dead.... sorry for the duplication
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Mono-devel-list mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-devel-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-devel-list&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671421&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11671421.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11671329</id>
	<title>Re: [Mono-dev] Mono memory problems!</title>
	<published>2007-07-18T09:44:03Z</published>
	<updated>2007-07-18T09:44:03Z</updated>
	<author>
		<name>David Isaac Wolinsky</name>
	</author>
	<content type="html">We've isolated the problem down to AutoResetEvent...
&lt;br&gt;&lt;br&gt;using System;
&lt;br&gt;using System.Threading;
&lt;br&gt;&lt;br&gt;namespace Ipop {
&lt;br&gt;&amp;nbsp; public class IPOP_Common {
&lt;br&gt;&amp;nbsp; &amp;nbsp; public static void Main() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AutoResetEvent re = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; while(true) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; re = new AutoResetEvent(false);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; re.Close();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;blows up memory
&lt;br&gt;&lt;br&gt;whereas ...
&lt;br&gt;&lt;br&gt;using System.Security.Cryptography;
&lt;br&gt;using System;
&lt;br&gt;&lt;br&gt;namespace Ipop {
&lt;br&gt;&amp;nbsp; public class IPOP_Common {
&lt;br&gt;&amp;nbsp; &amp;nbsp; public static void Main() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; while(true) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] key = new byte[1024];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rng.GetBytes(key);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;This doesn't.
&lt;br&gt;&lt;br&gt;David Wolinsky wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; We run this software on system where memory is a concern. &amp;nbsp;The data that 
&lt;br&gt;&amp;gt; we presented is our test case system that has 50 nodes all running in 
&lt;br&gt;&amp;gt; the same mono process. &amp;nbsp;We run only a single node at each site which 
&lt;br&gt;&amp;gt; initially starts at ~15 MB, we've seen it swell to well over 300 MBs in 
&lt;br&gt;&amp;gt; a period of less than a week. &amp;nbsp;Since this must be used in production 
&lt;br&gt;&amp;gt; environments and is meant to be extremely lightweight we can forgive a 
&lt;br&gt;&amp;gt; small memory portion like 15 MB, since it has relatively no processing 
&lt;br&gt;&amp;gt; overhead, but at over 300 MBs our processes are often stopped by the 
&lt;br&gt;&amp;gt; remote admin and we are told to clean up the problem.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Since this seems to be a problem of using a non-compacting gc, do you 
&lt;br&gt;&amp;gt; know where the compacting gc is, so that we could at least test it out. &amp;nbsp;
&lt;br&gt;&amp;gt; I searched the SVN and found no clues of it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Also, I should correct myself, the results for memory consumption were 
&lt;br&gt;&amp;gt; not directly related to the test that grows at 25kB/sec. &amp;nbsp;I found this 
&lt;br&gt;&amp;gt; out after posting the data, I am running heap-shot right now with the 
&lt;br&gt;&amp;gt; correct test and it has grown 100MB in less than 1 hour.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; David
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Alan McGovern wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Well, after 12 hours at a consistent 25kB/sec, you'd expect to have 
&lt;br&gt;&amp;gt;&amp;gt; over 1 gig of memory allocated. As you don't, i think what you're 
&lt;br&gt;&amp;gt;&amp;gt; seeing is just 'normal usage' for the non-compacting GC that mono 
&lt;br&gt;&amp;gt;&amp;gt; uses. I have a similar app which uses sockets extensively (50-150 
&lt;br&gt;&amp;gt;&amp;gt; simultaneous connections) &amp;nbsp;and i can assure you that memory usage 
&lt;br&gt;&amp;gt;&amp;gt; doesn't get unbearably large. It'd be interesting to see the logs but 
&lt;br&gt;&amp;gt;&amp;gt; i don't think there's much to be worried about.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Alan.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 7/18/07, *David Wolinsky* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Initially 45 MB, 12 hours later 147 MB
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Another developer has the heap-shot logs, I'll post those as soon as
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; possible.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Alan McGovern wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Could you post up the detailed stats from heapshot? After the 12
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; hour
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; run, how much memory are you using? Are we talking in the gigabyte
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; range, or megabyte range?
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Alan.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; On 7/18/07, *David Wolinsky* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; My lab works on a peer-to-peer network overlay and we've noticed
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; recently significant memory issues. &amp;nbsp;Some background...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; This application is constantly creating new objects and shortly
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; thereafter deleting (removing reference to) them
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Using a sample run with 150 threads running...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Mono on Linux has a growth rate of ~25 KB per second with a
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; base
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; of 50MB
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; (y = 25K *x + 50M)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; .NET on Windows stabilizes at 35 MB
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We ran heap-shot with Linux and found that in a 12 hour
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; period it
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; reported this...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; start:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; objects: 58,823
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,838,426 bytes
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; end:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; objects: 59,925
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,862,336
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We have run mono with GC_MAXIMUM_HEAP_SIZE and the memory size
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; (RES) got
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; significantly bigger than it.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; I have searched for the Compacting GC with no luck, we would
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; really like
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; to see if it would help our problem.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; The only operating system resources we're using are Sockets, but
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; we use
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; them VERY heavily!
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; If anyone has any suggestions, we'd be open to test out
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; anything
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; at this
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; point!
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We are leaning towards an issue in unmanaged memory and
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; possibly a bug
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; in mono.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Best regards,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; ps, I fwded this to gc and devel list because gc list looks
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; quite
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; dead.... sorry for the duplication
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Mono-devel-list mailing list
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-devel-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-devel-list&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11671329&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11671329.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11670872</id>
	<title>Re: [Mono-dev] Mono memory problems!</title>
	<published>2007-07-18T09:20:08Z</published>
	<updated>2007-07-18T09:20:08Z</updated>
	<author>
		<name>David Isaac Wolinsky</name>
	</author>
	<content type="html">We run this software on system where memory is a concern. &amp;nbsp;The data that 
&lt;br&gt;we presented is our test case system that has 50 nodes all running in 
&lt;br&gt;the same mono process. &amp;nbsp;We run only a single node at each site which 
&lt;br&gt;initially starts at ~15 MB, we've seen it swell to well over 300 MBs in 
&lt;br&gt;a period of less than a week. &amp;nbsp;Since this must be used in production 
&lt;br&gt;environments and is meant to be extremely lightweight we can forgive a 
&lt;br&gt;small memory portion like 15 MB, since it has relatively no processing 
&lt;br&gt;overhead, but at over 300 MBs our processes are often stopped by the 
&lt;br&gt;remote admin and we are told to clean up the problem.
&lt;br&gt;&lt;br&gt;Since this seems to be a problem of using a non-compacting gc, do you 
&lt;br&gt;know where the compacting gc is, so that we could at least test it out. &amp;nbsp;
&lt;br&gt;I searched the SVN and found no clues of it.
&lt;br&gt;&lt;br&gt;Also, I should correct myself, the results for memory consumption were 
&lt;br&gt;not directly related to the test that grows at 25kB/sec. &amp;nbsp;I found this 
&lt;br&gt;out after posting the data, I am running heap-shot right now with the 
&lt;br&gt;correct test and it has grown 100MB in less than 1 hour.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;David
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Alan McGovern wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Well, after 12 hours at a consistent 25kB/sec, you'd expect to have 
&lt;br&gt;&amp;gt; over 1 gig of memory allocated. As you don't, i think what you're 
&lt;br&gt;&amp;gt; seeing is just 'normal usage' for the non-compacting GC that mono 
&lt;br&gt;&amp;gt; uses. I have a similar app which uses sockets extensively (50-150 
&lt;br&gt;&amp;gt; simultaneous connections) &amp;nbsp;and i can assure you that memory usage 
&lt;br&gt;&amp;gt; doesn't get unbearably large. It'd be interesting to see the logs but 
&lt;br&gt;&amp;gt; i don't think there's much to be worried about.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Alan.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 7/18/07, *David Wolinsky* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Initially 45 MB, 12 hours later 147 MB
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Another developer has the heap-shot logs, I'll post those as soon as
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; possible.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Alan McGovern wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Could you post up the detailed stats from heapshot? After the 12
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; hour
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; run, how much memory are you using? Are we talking in the gigabyte
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; range, or megabyte range?
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; Alan.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; On 7/18/07, *David Wolinsky* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; My lab works on a peer-to-peer network overlay and we've noticed
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; recently significant memory issues. &amp;nbsp;Some background...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; This application is constantly creating new objects and shortly
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; thereafter deleting (removing reference to) them
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Using a sample run with 150 threads running...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Mono on Linux has a growth rate of ~25 KB per second with a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; base
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; of 50MB
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; (y = 25K *x + 50M)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; .NET on Windows stabilizes at 35 MB
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We ran heap-shot with Linux and found that in a 12 hour
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; period it
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; reported this...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; start:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; objects: 58,823
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,838,426 bytes
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; end:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; objects: 59,925
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,862,336
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We have run mono with GC_MAXIMUM_HEAP_SIZE and the memory size
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; (RES) got
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; significantly bigger than it.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; I have searched for the Compacting GC with no luck, we would
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; really like
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; to see if it would help our problem.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; The only operating system resources we're using are Sockets, but
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; we use
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; them VERY heavily!
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; If anyone has any suggestions, we'd be open to test out
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; anything
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; at this
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; point!
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; We are leaning towards an issue in unmanaged memory and
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; possibly a bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; in mono.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Best regards,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; ps, I fwded this to gc and devel list because gc list looks
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; quite
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; dead.... sorry for the duplication
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; Mono-devel-list mailing list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-devel-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-devel-list&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11670872&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11670872.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11668315</id>
	<title>Re: [Mono-dev] Mono memory problems!</title>
	<published>2007-07-18T07:06:32Z</published>
	<updated>2007-07-18T07:06:32Z</updated>
	<author>
		<name>David Isaac Wolinsky</name>
	</author>
	<content type="html">Initially 45 MB, 12 hours later 147 MB
&lt;br&gt;&lt;br&gt;Another developer has the heap-shot logs, I'll post those as soon as 
&lt;br&gt;possible.
&lt;br&gt;&lt;br&gt;David
&lt;br&gt;&lt;br&gt;Alan McGovern wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Could you post up the detailed stats from heapshot? After the 12 hour 
&lt;br&gt;&amp;gt; run, how much memory are you using? Are we talking in the gigabyte 
&lt;br&gt;&amp;gt; range, or megabyte range?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Alan.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 7/18/07, *David Wolinsky* &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11668315&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11668315&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidiw@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; My lab works on a peer-to-peer network overlay and we've noticed
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; recently significant memory issues. &amp;nbsp;Some background...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; This application is constantly creating new objects and shortly
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; thereafter deleting (removing reference to) them
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Using a sample run with 150 threads running...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Mono on Linux has a growth rate of ~25 KB per second with a base
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; of 50MB
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (y = 25K *x + 50M)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; .NET on Windows stabilizes at 35 MB
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; We ran heap-shot with Linux and found that in a 12 hour period it
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; reported this...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; start:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; objects: 58,823
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,838,426 bytes
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; end:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; objects: 59,925
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; heap memory: 6,862,336
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; We have run mono with GC_MAXIMUM_HEAP_SIZE and the memory size
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; (RES) got
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; significantly bigger than it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I have searched for the Compacting GC with no luck, we would
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; really like
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; to see if it would help our problem.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; The only operating system resources we're using are Sockets, but
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; we use
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; them VERY heavily!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; If anyone has any suggestions, we'd be open to test out anything
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; at this
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; point!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; We are leaning towards an issue in unmanaged memory and possibly a bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; in mono.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Best regards,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ps, I fwded this to gc and devel list because gc list looks quite
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; dead.... sorry for the duplication
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Mono-devel-list mailing list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11668315&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11668315&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-devel-list@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-devel-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-devel-list&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11668315&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11668315.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11667460</id>
	<title>Mono memory problems!</title>
	<published>2007-07-18T06:08:51Z</published>
	<updated>2007-07-18T06:08:51Z</updated>
	<author>
		<name>David Isaac Wolinsky</name>
	</author>
	<content type="html">My lab works on a peer-to-peer network overlay and we've noticed 
&lt;br&gt;recently significant memory issues. &amp;nbsp;Some background...
&lt;br&gt;&lt;br&gt;This application is constantly creating new objects and shortly 
&lt;br&gt;thereafter deleting (removing reference to) them
&lt;br&gt;Using a sample run with 150 threads running...
&lt;br&gt;Mono on Linux has a growth rate of ~25 KB per second with a base of 50MB 
&lt;br&gt;(y = 25K *x + 50M)
&lt;br&gt;.NET on Windows stabilizes at 35 MB
&lt;br&gt;&lt;br&gt;We ran heap-shot with Linux and found that in a 12 hour period it 
&lt;br&gt;reported this...
&lt;br&gt;start:
&lt;br&gt;objects: 58,823
&lt;br&gt;heap memory: 6,838,426 bytes
&lt;br&gt;&lt;br&gt;end:
&lt;br&gt;objects: 59,925
&lt;br&gt;heap memory: 6,862,336
&lt;br&gt;&lt;br&gt;We have run mono with GC_MAXIMUM_HEAP_SIZE and the memory size (RES) got 
&lt;br&gt;significantly bigger than it.
&lt;br&gt;&lt;br&gt;I have searched for the Compacting GC with no luck, we would really like 
&lt;br&gt;to see if it would help our problem.
&lt;br&gt;&lt;br&gt;The only operating system resources we're using are Sockets, but we use 
&lt;br&gt;them VERY heavily!
&lt;br&gt;&lt;br&gt;If anyone has any suggestions, we'd be open to test out anything at this 
&lt;br&gt;point!
&lt;br&gt;&lt;br&gt;We are leaning towards an issue in unmanaged memory and possibly a bug 
&lt;br&gt;in mono.
&lt;br&gt;&lt;br&gt;Best regards,
&lt;br&gt;David
&lt;br&gt;&lt;br&gt;&lt;br&gt;ps, I fwded this to gc and devel list because gc list looks quite 
&lt;br&gt;dead.... sorry for the duplication
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11667460&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11667460.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11679031</id>
	<title>Mono memory problems!</title>
	<published>2007-07-17T23:08:29Z</published>
	<updated>2007-07-17T23:08:29Z</updated>
	<author>
		<name>David Isaac Wolinsky</name>
	</author>
	<content type="html">My lab works on a peer-to-peer network overlay and we've noticed 
&lt;br&gt;recently significant memory issues. &amp;nbsp;Some background...
&lt;br&gt;&lt;br&gt;This application is constantly creating new objects and shortly 
&lt;br&gt;thereafter deleting (removing reference to) them
&lt;br&gt;Using a sample run with 150 threads running...
&lt;br&gt;Mono on Linux has a growth rate of ~25 KB per second with a base of 50MB 
&lt;br&gt;(y = 25K *x + 50M)
&lt;br&gt;.NET on Windows stabilizes at 35 MB
&lt;br&gt;&lt;br&gt;We ran heap-shot with Linux and found that in a 12 hour period it 
&lt;br&gt;reported this...
&lt;br&gt;start:
&lt;br&gt;objects: 58,823
&lt;br&gt;heap memory: 6,838,426 bytes
&lt;br&gt;&lt;br&gt;end:
&lt;br&gt;objects: 59,925
&lt;br&gt;heap memory: 6,862,336
&lt;br&gt;&lt;br&gt;We have run mono with GC_MAXIMUM_HEAP_SIZE and the memory size (RES) got 
&lt;br&gt;significantly bigger than it.
&lt;br&gt;&lt;br&gt;I have searched for the Compacting GC with no luck, we would really like 
&lt;br&gt;to see if it would help our problem.
&lt;br&gt;&lt;br&gt;The only operating system resources we're using are Sockets, but we use 
&lt;br&gt;them VERY heavily!
&lt;br&gt;&lt;br&gt;If anyone has any suggestions, we'd be open to test out anything at this 
&lt;br&gt;point!
&lt;br&gt;&lt;br&gt;We are leaning towards an issue in unmanaged memory and possibly a bug 
&lt;br&gt;in mono.
&lt;br&gt;&lt;br&gt;Best regards,
&lt;br&gt;David
&lt;br&gt;&lt;br&gt;&lt;br&gt;ps, I fwded this to gc and devel list because gc list looks quite 
&lt;br&gt;dead.... sorry for the duplication
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11679031&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Mono-memory-problems%21-tp11679031p11679031.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11660005</id>
	<title>Request for backport of garbage collection patch</title>
	<published>2007-07-17T17:54:34Z</published>
	<updated>2007-07-17T17:54:34Z</updated>
	<author>
		<name>Matt Jones-7</name>
	</author>
	<content type="html">Hi -
&lt;br&gt;&lt;br&gt;I'm working on improving mono-under-wine (on the wine side), and I've
&lt;br&gt;been hitting a bug in the mono garbage collector fixed by commit
&lt;br&gt;#77073 ([1]). The bug in question is a race condition between
&lt;br&gt;GetExitCodeThread and SuspendThread - if a thread terminates between
&lt;br&gt;the two, SuspendThread will fail. The race condition is pretty
&lt;br&gt;reliably triggered by the regression test suite when running under
&lt;br&gt;wine.
&lt;br&gt;&lt;br&gt;The current patch could actually be reduced further (the
&lt;br&gt;GetExitCodeThread block could be fully deleted, as it is rendered
&lt;br&gt;redundant), but it works as is.
&lt;br&gt;&lt;br&gt;Any chance this patch could be applied to the maintenance branch? The
&lt;br&gt;patch applies cleanly to 1.13.8.2.
&lt;br&gt;&lt;br&gt;Thank you very much,
&lt;br&gt;-Matt Jones
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://anonsvn.mono-project.com/viewcvs/trunk/mono/libgc/win32_threads.c?rev=77073&amp;view=log&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://anonsvn.mono-project.com/viewcvs/trunk/mono/libgc/win32_threads.c?rev=77073&amp;view=log&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11660005&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Request-for-backport-of-garbage-collection-patch-tp11660005p11660005.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11062568</id>
	<title>Re: Tracing GC operations</title>
	<published>2007-06-11T09:19:37Z</published>
	<updated>2007-06-11T09:19:37Z</updated>
	<author>
		<name>Paolo Molaro-2</name>
	</author>
	<content type="html">On 06/08/07 Matt Jones wrote:
&lt;br&gt;&amp;gt; I'm trying to hunt down a threading bug in wine that shows up when some of
&lt;br&gt;&amp;gt; the unit tests from mono are run under wine (so using a windows version of
&lt;br&gt;&amp;gt; mono). The bug shows up during the GC collect cycle (the function is gc_push
&lt;br&gt;&amp;gt; or something like that). It's not a bug in mono per se, but being able to
&lt;br&gt;&amp;gt; trace the operation of the gc would make figuring out what's going on much
&lt;br&gt;&amp;gt; easier. Is there any good tracing facility for this? I've tried &amp;quot;mono
&lt;br&gt;&amp;gt; --trace=System.GC&amp;quot;, but I don't get anything out.
&lt;br&gt;&lt;br&gt;That will trace only the calls to the managed methods in the GC class.
&lt;br&gt;Setting the env vars GC_DUMP_REGULARLY and GC_PRINT_STATS will generate
&lt;br&gt;GC logging information, though I'm not sure it would be useful in your
&lt;br&gt;case. Likely getting the crash to happen while under gdb and poking
&lt;br&gt;around can be more useful.
&lt;br&gt;&lt;br&gt;&amp;gt; Also, is there any way to control the operation of the GC (such as forcing a
&lt;br&gt;&amp;gt; full pass at a pre-determined time etc.). Part of the problem with the bug
&lt;br&gt;&amp;gt; I'm trying to hunt down is that it occurs very rarely (unsurprising as its
&lt;br&gt;&amp;gt; likely to do with wine's handling of threading), so coming up with a better
&lt;br&gt;&amp;gt; way than running the tests until the bug occurs would be awesome.
&lt;br&gt;&lt;br&gt;That's not possible without adding specific code to the GC and
&lt;br&gt;recompiling.
&lt;br&gt;You may also want to repost to mono-devel where people that use windows
&lt;br&gt;are more likely to read your email and maybe help more.
&lt;br&gt;&lt;br&gt;lupus
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;-----------------------------------------------------------------
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11062568&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; debian/rules
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11062568&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lupus@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Monkeys do it better
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11062568&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Tracing-GC-operations-tp11034731p11062568.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-11034731</id>
	<title>Tracing GC operations</title>
	<published>2007-06-08T15:54:05Z</published>
	<updated>2007-06-08T15:54:05Z</updated>
	<author>
		<name>Matt Jones-7</name>
	</author>
	<content type="html">Hi - &lt;br&gt;&lt;br&gt;I&amp;#39;m trying to hunt down a threading bug in wine that shows up when some of the unit tests from mono are run under wine (so using a windows version of mono). The bug shows up during the GC collect cycle (the function is gc_push or something like that). It&amp;#39;s not a bug in mono per se, but being able to trace the operation of the gc would make figuring out what&amp;#39;s going on much easier. Is there any good tracing facility for this? I&amp;#39;ve tried &amp;quot;mono --trace=
System.GC&amp;quot;, but I don&amp;#39;t get anything out.&lt;br&gt;&lt;br&gt;Also, is there any way to control the operation of the GC (such as forcing a full pass at a pre-determined time etc.). Part of the problem with the bug I&amp;#39;m trying to hunt down is that it occurs very rarely (unsurprising as its likely to do with wine&amp;#39;s handling of threading), so coming up with a better way than running the tests until the bug occurs would be awesome.
&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Matt Jones&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=11034731&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Tracing-GC-operations-tp11034731p11034731.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-4937130</id>
	<title>Calling Unmanaged dll from C#</title>
	<published>2006-06-19T08:03:20Z</published>
	<updated>2006-06-19T08:03:20Z</updated>
	<author>
		<name>romydmisc</name>
	</author>
	<content type="html">Hi All,
&lt;br&gt;&lt;br&gt;I want to use DllImport to call a C function that allocates and
&lt;br&gt;returns an array of strings. I'm not sure if this is the right place
&lt;br&gt;to ask this question, but my sample code works with windows .NET
&lt;br&gt;compiler, so either there is a different way to call unmanaged dlls in
&lt;br&gt;mono or may be i'm not implementing it right?
&lt;br&gt;&lt;br&gt;I've a C function that converts a char * to wchar_t *
&lt;br&gt;&lt;br&gt;DllExport &amp;nbsp;Func(wchar_t** ipadds)
&lt;br&gt;{
&lt;br&gt;char mbBuf[BUF_SIZE] = &amp;quot;1.1.1.1&amp;quot;;
&lt;br&gt;char* s = mbBuf;
&lt;br&gt;size_t len = strlen (mbBuf);
&lt;br&gt;wchar_t *result = malloc ((len + 1) * sizeof (wchar_t));
&lt;br&gt;wchar_t *wcp = result;
&lt;br&gt;wchar_t tmp;
&lt;br&gt;mbstate_t state;
&lt;br&gt;size_t nbytes;
&lt;br&gt;&lt;br&gt;int i = 0;
&lt;br&gt;memset (&amp;state, '\0', sizeof (state));
&lt;br&gt;while ((nbytes = mbrtowc (&amp;tmp, s, len, &amp;state)) &amp;gt; 0)
&lt;br&gt;&amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (nbytes &amp;gt;= (size_t) -2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* Invalid input string. &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return NULL;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; result[i] = tmp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; i++;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; len -= nbytes;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; s += nbytes;
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; result[i] = '\0';
&lt;br&gt;&amp;nbsp; *ipadds = result;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;My C# code looks like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; [DllImport(&amp;quot;KeyServerUsage.dll&amp;quot;, CharSet = CharSet.Auto,
&lt;br&gt;EntryPoint = &amp;quot;Func&amp;quot;)]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; private static extern void Func([Out] string[] Names);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public ArrayList GetIPAdd()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string[] ipadds = new string[2];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Func(ipadds);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;Now i get a blank array returned in ipadds when i run this program
&lt;br&gt;with mono. But when i run the same program on windows, i get &amp;quot;1.1.1.1&amp;quot;
&lt;br&gt;in ipadds[0]. Any help would be greatly appreciated. BTW I have the
&lt;br&gt;same question posted on mono-devel mailing list too.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Romy
&lt;br&gt;_______________________________________________
&lt;br&gt;Mono-gc-list maillist &amp;nbsp;- &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=4937130&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Mono-gc-list@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.ximian.com/mailman/listinfo/mono-gc-list&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.ximian.com/mailman/listinfo/mono-gc-list&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Calling-Unmanaged-dll-from-C--tp4937130p4937130.html" />
</entry>

</feed>
