Hi to all,

I'm asking news about the Bug 623477
(https://bugzilla.novell.com/show_bug.cgi?id=623477#c1).

I already post a patch but I have no answer about this.
The proposal solution is not the best because I prefer to have the
possibility to change the minimum quantity of memory assignment to the
thread stack size, but give the same behaviour between Windows and
Linux.

Since the patch is very short, I put below (P.S. this patch was
generated in the pre-git era so use the SVN revision number).


Best Regards, Torello.



Index: class/corlib/System.Threading/Thread.cs
===================================================================
--- class/corlib/System.Threading/Thread.cs    (revisione 159957)
+++ class/corlib/System.Threading/Thread.cs    (copia locale)
@@ -976,8 +976,12 @@
         {
             if (start == null)
                 throw new ArgumentNullException ("start");
-            if (maxStackSize < 131072)
-                throw new ArgumentException ("< 128 kb", "maxStackSize");
+            if (maxStackSize < 0)
+                throw new ArgumentException ("< 0 kb", "maxStackSize");
+            if (maxStackSize < 262144)
+                maxStackSize = 262144;
+            if ((maxStackSize | 0xffff) != 0)
+                maxStackSize = (maxStackSize | 0xffff)+0xffff;

             threadstart = start;
             Internal.stack_size = maxStackSize;
@@ -995,8 +999,12 @@
         {
             if (start == null)
                 throw new ArgumentNullException ("start");
-            if (maxStackSize < 131072)
-                throw new ArgumentException ("< 128 kb", "maxStackSize");
+            if (maxStackSize < 0)
+                throw new ArgumentException ("< 0 kb", "maxStackSize");
+            if (maxStackSize < 262144)
+                maxStackSize = 262144;
+            if ((maxStackSize | 0xffff) != 0)
+                maxStackSize = (maxStackSize | 0xffff)+0xffff;

             threadstart = start;
             Internal.stack_size = maxStackSize;
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to