[Mono-bugs] [Bug 81627][Nor] New - FileSystemWatcher RaiseEvent Causes Huge Heap

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon May 14 22:11:20 EDT 2007


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 gabriel.burt at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=81627

--- shadow/81627	2007-05-14 22:11:19.000000000 -0400
+++ shadow/81627.tmp.18187	2007-05-14 22:11:20.000000000 -0400
@@ -0,0 +1,48 @@
+Bug#: 81627
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: mono 1.2.3.1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: gabriel.burt at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: FileSystemWatcher RaiseEvent Causes Huge Heap
+
+I created a boo script to watch a directory, then made 10K files and
+subdirectories in it.  The system monitor reported that the writable memory
+for the script's process grew to about 1GB.  I ran heap-buddy on it to see
+what the problem was.
+
+System.MonoType had 3281.7M total worth of allocations from
+System.IO.FileSystemWatcher:RaiseEvent, and
+System.Runtime.Remoti...ing.MonoMethodMessage had 867.9M from the same.
+
+Here is my boo script:
+
+import System
+import System.IO
+import Gtk from "gtk-sharp"
+
+def OnEvent(sender as object, e as System.IO.FileSystemEventArgs):
+    print "${DateTime.Now} :: ${e.ChangeType} :: ${e.Name}"
+
+fsw = FileSystemWatcher("/home/gabe/newtmp/")
+fsw.IncludeSubdirectories = true
+fsw.Created += OnEvent
+fsw.Changed += OnEvent
+fsw.Deleted += OnEvent
+fsw.Renamed += OnEvent
+fsw.EnableRaisingEvents = true
+
+print "Running"
+
+Application.Init()
+Application.Run()


More information about the mono-bugs mailing list