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

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jul 19 09:48:55 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 juraj at hotfeet.ch.


--- shadow/81627	2007-07-18 13:23:00.000000000 -0400
+++ shadow/81627.tmp.28800	2007-07-19 09:48:55.000000000 -0400
@@ -200,6 +200,32 @@
 which notification mecanism was used?
 Did you have the MONO_MANAGED_WATCHER enviroment variable set?
 Juraj, your patch looks fine, could you sent it to the mono-devel list
 so it can have more reviews as it touches some very sensible code.
+------- Additional Comments From juraj at hotfeet.ch  2007-07-19 09:48 -------
+I'm writing down a few thoughts about the MulticastDelegate (MCD)
+implementation, see they don't get lost. Feel free to ignore or
+comment on them.
+Right now, MCDs are chained up in a linked list. The methods
+GetInvocationList() and KPM() (used by RemoveImpl) temporarily build a
+double linked list. This might lead to leaks (I haven't checked the
+code that thoroughly).
+According to "CLR via C#" (Jeffrey Richter), p. 340-344, MS.net use a
+different approach for the chaining. MCD have a field
+"_invocationList", which contains null or a reference to a array of
+delegates. If this field is null, the containing MCD is a "regular
+MCD" otherwise the containing MCS's only purpose is holding the list
+of chained MCDs.
+I'm attaching a modified version of MulticastDelegate.cs which follows
+that approach. You cannot use it unless you adjust the corresponding
+data structures and code in the runtime (search for
+- /metadata/object-internals.h
+- /metadata/verify.c
+- /metadata/marshal.c
+- /mini/mini-trampolines.c

More information about the mono-bugs mailing list