[Mono-bugs] [Bug 76386][Nor] New - garbage collector
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Oct 9 11:29:49 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by mohnader at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76386
--- shadow/76386 2005-10-09 11:29:49.000000000 -0400
+++ shadow/76386.tmp.21671 2005-10-09 11:29:49.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 76386
+Product: Mono: Runtime
+Version: 1.1
+OS: RHEL 2.1
+OS Details: RedHat es 4
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: GC
+AssignedTo: lupus at ximian.com
+ReportedBy: mohnader at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: garbage collector
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+The garbage collector do not release memory after calling the collect or
+even after waiting for a while. When monitoring the mono process, the
+memory is released after a very long time in term of hours. This actually
+leads to filling the webserver memory. First I doubted that the memory
+leak is from my code. However, I tried to run this code under Microsoft
+Runtime and there was no leakage. I noticed that this is due to using the
+Boehm garbage collector but does that mean that even calling collect
+explicitly the garbage collector release memory. Also, why the garbage
+collector always reserve memory and never releases it unless the process
+is killed or after waiting for a long time.
+
+Steps to reproduce the problem:
+1. here is sample code :
+
+Label1.Text="before "+GC.GetTotalMemory(true)/(1024*1024)+"MB<br> ";
+ MemoryStream mm=new MemoryStream(40000000);
+ for(int i=0;i<40000000;i++)
+ mm.WriteByte(byte.MaxValue);
+ mm=null;
+ Label1.Text+="after "+GC.GetTotalMemory(false)/
+(1024*1024)+"MB <br> ";
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ Label1.Text+="after collect "+GC.GetTotalMemory
+(false)/(1024*1024)+"MB ";
+
+
+2. Refresh this page several times.
+
+Actual Results:
+The amount of memory appears after the GC.Collect() never goes below
+38MB, or even after waiting for few minuits.
+
+Expected Results:
+On Microsoft Runtime it is 1MB only.
+
+
+
+How often does this happen?
+Always
+
+Additional Information:
More information about the mono-bugs
mailing list